Namespaces
Variants
Views
Actions

std::reverse_iterator::reverse_iterator

From cppreference.com
< cpp‎ | iterator‎ | reverse iterator
Revision as of 06:06, 2 July 2012 by P12 (Talk | contribs)

 
 
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
 

Template:ddcl list begin <tr class="t-dcl ">

<td >
reverse_iterator();
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
explicit reverse_iterator( Iterator x );
</td>

<td > (2) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
template< class U >
reverse_iterator( const reverse_iterator<U>& other );
</td>

<td > (3) </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Constructs a new iterator

1) Default constructor. current is value-initialized. This makes sense only if operations on an value-initialized Iterator make also sense.

2) current is initialized with x.

3) Copy constructor. The underlying iterator is initialized with that of other.

Parameters

x - iterator to adapt
other - iterator adaptor to copy

Example

See also

replaces a reverse_iterator
(public member function)