libstdc++
__gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > Class Template Reference

#include <iterator.h>

Inheritance diagram for __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >:
[legend]

Public Types

typedef std::iterator_traits< _Iterator1 > _TraitsType
 
typedef _TraitsType::difference_type difference_type
 
typedef _Iterator1 first_type
 
typedef _IteratorCategory iterator_category
 
typedef _IteratorPairpointer
 
typedef _IteratorPairreference
 
typedef _Iterator2 second_type
 
typedef void value_type
 

Public Member Functions

 _IteratorPair (const _Iterator1 &__first, const _Iterator2 &__second)
 
 operator _Iterator2 () const
 
_IteratorPair operator+ (difference_type __delta) const
 
_IteratorPairoperator++ ()
 
const _IteratorPair operator++ (int)
 
difference_type operator- (const _IteratorPair &__other) const
 
_IteratorPairoperator-- ()
 
const _IteratorPair operator-- (int)
 
_IteratorPairoperator= (const _IteratorPair &__other)
 
constexpr void swap (pair &__p) noexcept(__and_< __is_nothrow_swappable< _Iterator1 >, __is_nothrow_swappable< _Iterator2 > >::value)
 

Public Attributes

_Iterator1 first
 
_Iterator2 second
 

Related Symbols

(Note that these are not member symbols.)

constexpr pair< typename __decay_and_strip< _Iterator1 >::__type, typename __decay_and_strip< _Iterator2 >::__type > make_pair (_Iterator1 &&__x, _Iterator2 &&__y)
 
constexpr enable_if< __and_< __is_swappable< _Iterator1 >, __is_swappable< _Iterator2 > >::value >::type swap (pair< _Iterator1, _Iterator2 > &__x, pair< _Iterator1, _Iterator2 > &__y) noexcept(noexcept(__x.swap(__y)))
 
constexpr bool operator== (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 
constexpr bool operator< (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 
constexpr bool operator!= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 
constexpr bool operator> (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 
constexpr bool operator<= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 
constexpr bool operator>= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
 

Detailed Description

template<typename _Iterator1, typename _Iterator2, typename _IteratorCategory>
class __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >

A pair of iterators. The usual iterator operations are applied to both child iterators.

Definition at line 45 of file iterator.h.

Member Typedef Documentation

◆ _TraitsType

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef std::iterator_traits<_Iterator1> __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::_TraitsType

Definition at line 54 of file iterator.h.

◆ difference_type

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef _TraitsType::difference_type __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::difference_type

Definition at line 55 of file iterator.h.

◆ first_type

typedef _Iterator1 std::pair< _Iterator1 , _Iterator2 >::first_type
inherited

The type of the first member.

Definition at line 188 of file stl_pair.h.

◆ iterator_category

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef _IteratorCategory __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::iterator_category

Definition at line 51 of file iterator.h.

◆ pointer

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef _IteratorPair* __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::pointer

Definition at line 56 of file iterator.h.

◆ reference

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef _IteratorPair& __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::reference

Definition at line 57 of file iterator.h.

◆ second_type

typedef _Iterator2 std::pair< _Iterator1 , _Iterator2 >::second_type
inherited

The type of the second member.

Definition at line 189 of file stl_pair.h.

◆ value_type

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
typedef void __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::value_type

Definition at line 52 of file iterator.h.

Constructor & Destructor Documentation

◆ _IteratorPair() [1/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
__gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::_IteratorPair ( )
inline

Definition at line 59 of file iterator.h.

◆ _IteratorPair() [2/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
__gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::_IteratorPair ( const _Iterator1 &  __first,
const _Iterator2 &  __second 
)
inline

Definition at line 61 of file iterator.h.

Member Function Documentation

◆ operator _Iterator2()

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
__gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator _Iterator2 ( ) const
inline

Definition at line 93 of file iterator.h.

◆ operator+()

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
_IteratorPair __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator+ ( difference_type  __delta) const
inline

Definition at line 105 of file iterator.h.

◆ operator++() [1/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
_IteratorPair & __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator++ ( )
inline

Definition at line 66 of file iterator.h.

◆ operator++() [2/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
const _IteratorPair __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator++ ( int  )
inline

Definition at line 75 of file iterator.h.

◆ operator-()

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
difference_type __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator- ( const _IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > &  __other) const
inline

Definition at line 110 of file iterator.h.

◆ operator--() [1/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
_IteratorPair & __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator-- ( )
inline

Definition at line 80 of file iterator.h.

◆ operator--() [2/2]

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
const _IteratorPair __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator-- ( int  )
inline

Definition at line 89 of file iterator.h.

◆ operator=()

template<typename _Iterator1 , typename _Iterator2 , typename _IteratorCategory >
_IteratorPair & __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >::operator= ( const _IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > &  __other)
inline

Definition at line 97 of file iterator.h.

◆ swap()

constexpr void std::pair< _Iterator1 , _Iterator2 >::swap ( pair< _Iterator1, _Iterator2 > &  __p)
inlineconstexprnoexceptinherited

Swap the first members and then the second members.

Definition at line 204 of file stl_pair.h.

Friends And Related Symbol Documentation

◆ make_pair()

constexpr pair< typename __decay_and_strip< _Iterator1 >::__type, typename __decay_and_strip< _Iterator2 >::__type > make_pair ( _Iterator1 &&  __x,
_Iterator2 &&  __y 
)
related

A convenience wrapper for creating a pair from two objects.

Parameters
__xThe first object.
__yThe second object.
Returns
A newly-constructed pair<> object of the appropriate type.

The C++98 standard says the objects are passed by reference-to-const, but C++03 says they are passed by value (this was LWG issue #181).

Since C++11 they have been passed by forwarding reference and then forwarded to the new members of the pair. To create a pair with a member of reference type, pass a reference_wrapper to this function.

Definition at line 741 of file stl_pair.h.

◆ operator!=()

constexpr bool operator!= ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Uses operator== to find the result.

Definition at line 670 of file stl_pair.h.

◆ operator<()

constexpr bool operator< ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Defines a lexicographical order for pairs.

For two pairs of the same type, P is ordered before Q if P.first is less than Q.first, or if P.first and Q.first are equivalent (neither is less than the other) and P.second is less than Q.second.

Definition at line 662 of file stl_pair.h.

◆ operator<=()

constexpr bool operator<= ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Uses operator< to find the result.

Definition at line 681 of file stl_pair.h.

◆ operator==()

constexpr bool operator== ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Two pairs of the same type are equal iff their members are equal.

Definition at line 640 of file stl_pair.h.

◆ operator>()

constexpr bool operator> ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Uses operator< to find the result.

Definition at line 676 of file stl_pair.h.

◆ operator>=()

constexpr bool operator>= ( const pair< _Iterator1 , _Iterator2 > &  __x,
const pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Uses operator< to find the result.

Definition at line 688 of file stl_pair.h.

◆ swap()

constexpr enable_if< __and_< __is_swappable< _Iterator1 >, __is_swappable< _Iterator2 > >::value >::type swap ( pair< _Iterator1 , _Iterator2 > &  __x,
pair< _Iterator1 , _Iterator2 > &  __y 
)
related

Swap overload for pairs. Calls std::pair::swap().

Note
This std::swap overload is not declared in C++03 mode, which has performance implications, e.g. see https://gcc.gnu.org/PR38466

Definition at line 707 of file stl_pair.h.

Member Data Documentation

◆ first

_Iterator1 std::pair< _Iterator1 , _Iterator2 >::first
inherited

The first member.

Definition at line 191 of file stl_pair.h.

◆ second

_Iterator2 std::pair< _Iterator1 , _Iterator2 >::second
inherited

The second member.

Definition at line 192 of file stl_pair.h.


The documentation for this class was generated from the following file: