std::make_reverse_iterator (3) - Linux Manuals
std::make_reverse_iterator: std::make_reverse_iterator
NAME
std::make_reverse_iterator - std::make_reverse_iterator
Synopsis
Defined in header <iterator>
template <class Iter> (since C++14)
std::reverse_iterator<Iter> make_reverse_iterator( Iter i ); (until C++17)
template <class Iter> (since C++17)
constexpr std::reverse_iterator<Iter> make_reverse_iterator( Iter i );
make_reverse_iterator is a convenience function template that constructs a std::reverse_iterator for the given iterator i with the type deduced from the type of the argument.
Parameters
i - iterator to be converted to reverse iterator
Return value
A std::reverse_iterator constructed from i
Possible implementation
Example
// Run this code
Output:
See also
reverse_iterator (class template)
rbegin returns a reverse iterator to a container or array
crbegin (function template)
(C++14)
rend returns a reverse end iterator for a container or array
crend (function template)
(C++14)