std::reverse_iterator::operators

reverse_iterator& operator++(); (1) reverse_iterator& operator--(); (2) reverse_iterator operator++( int ); (3) reverse_iterator operator--( int ); (4) reverse_iterator operator+( difference_type n ) const; (5) reverse_iterator operator-( difference_type n ) const; (6) reverse_iterator& operator+=( difference_type n ); (7) reverse_iterator& operator-=( difference_type n ); (8) Increments or decrements the iterator. Inverse operat

std::reverse_iterator::base

Iterator base() const; Returns the underlying base iterator. That is std::reverse_iterator(it).base() == it. The base iterator refers to the element that is next (from the std::reverse_iterator::iterator_type perspective) to the element the reverse_iterator is currently pointing to. That is &*(rit.base() - 1) == &*rit. Parameters (none). Return value The underlying iterator. Exceptions (none). Example #include <iostream> #include <iterator> #include <

std::reverse_iterator

Defined in header <iterator> template< class Iterator > class reverse_iterator : public std::iterator< typename std::iterator_traits<Iterator>::iterator_category, typename std::iterator_traits<Iterator>::value_type, typename std::iterator_traits<Iterator>::difference_type, typename std::iterator_traits<Iterator>::pointer,

std::reverse_copy

Defined in header <algorithm> template< class BidirIt, class OutputIt > OutputIt reverse_copy( BidirIt first, BidirIt last, OutputIt d_first ); Copies the elements from the range [first, last) to another range beginning at d_first in such a way that the elements in the new range are in reverse order. Behaves as if by executing the assignment *(d_first + (last - first) - 1 - i) = *(first + i) once for each non-negative i < (last - first). If the source and destinati

std::reverse

Defined in header <algorithm> template< class BidirIt > void reverse( BidirIt first, BidirIt last ); Reverses the order of the elements in the range [first, last). Behaves as if applying std::iter_swap to every pair of iterators first+i, (last-i) - 1 for each non-negative i < (last-first)/2. Parameters first, last - the range of elements to reverse Type requirements - BidirIt must meet the requirements of BidirectionalIterator. -The type of dereferenc

std::return_temporary_buffer

Defined in header <memory> template< class T > void return_temporary_buffer( T* p ); Deallocates storage previously allocated with std::get_temporary_buffer. Parameters p - the pointer previously returned by std::get_temporary_buffer and not invalidated by an earlier call to return_temporary_buffer Return value (none). Exceptions (none). (since C++17) Example #include <algorithm> #include <iostream> #include <memory> #include

std::rethrow_if_nested

Defined in header <exception> template< class E > void rethrow_if_nested( const E& e ); (since C++11) If E is not a polymorphic class type, does nothing. Otherwise, if dynamic_cast<const std::nested_exception&>(e) would succeed (i.e., if E or the dynamic type (the most derived type) of the object referenced by e is std::nested_exception or publicly and unambiguously derived from std::nested_exception), extracts and throws the nested exception as if by ca

std::rethrow_exception

Defined in header <exception> [[noreturn]] void rethrow_exception( std::exception_ptr p ) (since C++11) Throws the previously captured exception object, referred to by the exception pointer p. Parameters p - non-null std::exception_ptr Return value (none). Example #include <iostream> #include <string> #include <exception> #include <stdexcept> void handle_eptr(std::exception_ptr eptr) // passing by value is ok { try {

std::result_of

Defined in header <type_traits> template< class > class result_of; // undefined template< class F, class... ArgTypes > class result_of<F(ArgTypes...)>; (since C++11) Deduces the return type of a function call expression at compile time. F must be a callable type, reference to function, or reference to callable type. Invoking F with ArgTypes... must be a well-formed expression (since C++11) F and all types in ArgTypes can be any complete type, array of

std::resetiosflags

Defined in header <iomanip> /*unspecified*/ resetiosflags( std::ios_base::fmtflags mask ); When used in an expression out << resetiosflags(mask) or in >> resetiosflags(mask), clears all format flags of the stream out or in as specified by the mask. Parameters mask - bitmask of the flags to clear Return value Returns an object of unspecified type such that if str is the name of an output stream of type std::basic_ostream<CharT, Traits> or std: