Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::revers...rse_iterator(3) C++ Standard Libarystd::revers...rse_iterator(3)

NAME
       std::reverse_iterator::reverse_iterator	 -  std::reverse_iterator::re-
       verse_iterator

Synopsis
	  reverse_iterator();				   (until C++17)
	  constexpr reverse_iterator();			   (since C++17)
	  explicit reverse_iterator( iterator_type			  (un-
       til C++17)
	  x );
	  constexpr		    explicit		     reverse_iterator(
       (since C++17)
	  iterator_type	x );			   (1)
	  template<	 class	    U	   >				   (2)
       (until
	  reverse_iterator(						 const
       C++17)
	  reverse_iterator<U>& other );			   (3)
	  template<		    class		  U		     >
       (since
	  constexpr		      reverse_iterator(			 const
       C++17)
	  reverse_iterator<U>& other );

	  Constructs a new iterator adaptor.

	  1) Default constructor. The underlying  iterator  is	value-initial-
       ized. Operations	on
	  the resulting	iterator have defined behavior if and only if the cor-
       responding
	  operations on	a value-initialized Iter also have defined behavior.
	  2) The underlying iterator is	initialized with x.
	  3) The underlying iterator is	initialized with that of other.
	  This	overload  participates in overload resolution only if U	is not
       the same	type as
	  Iter and std::convertible_to<const U&, Iter> is modeled
	  (since C++20).

Parameters
	  x	- iterator to adapt
	  other	- iterator adaptor to copy

Example
	   This	section	is incomplete
	   Reason: no example

	 Defect	reports

	  The following	behavior-changing defect reports were applied retroac-
       tively to
	  previously published C++ standards.

	     DR	     Applied	to		   Behavior    as    published
       Correct behavior
	  LWG	3435   C++20	   the	converting  constructor	 from  another
       constrained
			      reverse_iterator was not constrained

See also
	  operator=		assigns	another	iterator adaptor
				(public	member function)
	  make_reverse_iterator	creates	a std::reverse_iterator	 of  type  in-
       ferred from the
	  (C++14)		argument
				(function template)

http://cppreference.com		  2022.07.31	 std::revers...rse_iterator(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::reverse_iterator::reverse_iterator&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help