std::reverse_iterator::reverse_iterator

reverse_iterator(); (1) explicit reverse_iterator( Iterator x ); (2) template< class U > reverse_iterator( const reverse_iterator<U>& other ); (3) Constructs a new iterator adaptor. 1) Default constructor. current is value-initialized. Operations on the resulting iterator have defined behavior if and only if the corresponding operations on a value-initialized Iterator also have defined behavior. 2) current is initialized with x. 3) Copy constructor. The u

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_iterator::operator[]

/*unspecified*/ operator[]( difference_type n ) const; Returns a reference to the element at specified relative location. Parameters n - position relative to current location. Return value A reference to the element at relative location, that is, current[-n-1]. Examples See also operator*operator-> accesses the pointed-to element (public member function)

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::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::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::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::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::replace_copy

Defined in header <algorithm> template< class InputIt, class OutputIt, class T > OutputIt replace_copy( InputIt first, InputIt last, OutputIt d_first, const T& old_value, const T& new_value ); (1) template< class InputIt, class OutputIt, class UnaryPredicate, class T > OutputIt replace_copy_if( InputIt first, InputIt last, OutputIt d_first, UnaryPredicate p, const T& new_value ); (2) Copies the a

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: