std::rend(std::initializer_list) (3) - Linux Manuals
std::rend(std::initializer_list): std::rend(std::initializer_list)
NAME
std::rend(std::initializer_list) - std::rend(std::initializer_list)
Synopsis
Defined in header <iterator>
template <class E> (since C++14)
std::reverse_iterator<const E*> rend( std::initializer_list<E> il );
The overload of std::rend for initializer_list returns an std::reverse_iterator pointing at the first element of il.
Parameters
il - an initializer_list
Return value
std::reverse_iterator<const E*>(il.begin()).
Exceptions
(none)
Notes
This overload is necessary because std::initializer_list does not have a member function rend. No overload is needed for std::crend because it is implemented in terms of std::rend.
Example
// Run this code
Output:
See also
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)