Namespaces
Variants
Views
Actions

std::rend(std::initializer_list)

From cppreference.com
< cpp‎ | utility‎ | initializer list
Revision as of 13:13, 9 September 2013 by Cubbi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Defined in header <iterator>
template <class E>
std::reverse_iterator<const E*> rend( std::initializer_list<E> il );
(since C++14)

The overload of std::rend for initializer_list returns an std::reverse_iterator pointing at the first element of il.

Contents

[edit] Parameters

il - an initializer_list

[edit] Return value

std::reverse_iterator<const E*>(il.begin()).

[edit] Exceptions

(none)

[edit] 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.

[edit] Example

[edit] See also

returns a reverse iterator to a container or array
(function) [edit]
(C++14)
returns a reverse end iterator for a container or array
(function) [edit]