__GNU_PARALLEL::_ITERATORPAIR(3cxx)
π NAME π
Bestie, this is the class page for __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory > from the 3cxx manual. It is literally a pair of iterators, and the usual iterator operations are applied to both child iterators. It inherits from std::pair< _Iterator1, _Iterator2 >.
β¨ SYNOPSIS β¨
#include <iterator.h>
It inherits from std::pair< _Iterator1, _Iterator2 >.
πΈ Public Types πΈ
typedef std::iterator_traits< _Iterator1 > _TraitsTypeβ the traits type for the first iterator.typedef _TraitsType::difference_type difference_typeβ the difference type, borrowed from_TraitsType.typedef _Iterator1 first_typeβ the type of the first member.typedef _IteratorCategory iterator_categoryβ the iterator category.typedef _IteratorPair * pointerβ pointer to this_IteratorPairsituation.typedef _IteratorPair & referenceβ reference to this_IteratorPairsituation.typedef _Iterator2 second_typeβ the type of the second member.typedef void value_typeβ yep,value_typeisvoid.
π Public Member Functions π
_IteratorPair (const _Iterator1 &__first, const _Iterator2 &__second)β the constructor, takingconst _Iterator1 &__firstandconst _Iterator2 &__second.operator _Iterator2 () constβ conversion operator to_Iterator2._IteratorPair operator+ (difference_type __delta) constβ plus operator withdifference_type __delta._IteratorPair & operator++ ()β pre-increment, returning_IteratorPair &.const _IteratorPair operator++ (int)β post-increment, returningconst _IteratorPair.difference_type operator- (const _IteratorPair &__other) constβ difference operator againstconst _IteratorPair &__other._IteratorPair & operator-- ()β pre-decrement, returning_IteratorPair &.const _IteratorPair operator-- (int)β post-decrement, returningconst _IteratorPair._IteratorPair & operator= (const _IteratorPair &__other)β assignment fromconst _IteratorPair &__other.constexpr void swap (pair &__p) noexcept(__and_< __is_nothrow_swappable< _Iterator1 >, __is_nothrow_swappable< _Iterator2 > >::value)β swap the first members and then the second members.
π¦ Public Attributes π¦
_Iterator1 firstβ the first member._Iterator2 secondβ the second member.
π Related Symbols π
(Note that these are not member symbols.)
make_pairβ a convenience wrapper for creating a pair from two objects.
constexpr pair< typename __decay_and_strip< _Iterator1 >::__type, typename __decay_and_strip< _Iterator2 >::__type > make_pair (_Iterator1 &&__x, _Iterator2 &&__y)
swap(related overload) β the pair swap overload, withnoexcept(noexcept(__x.swap(__y)))in the signature.
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)))
operator==β signature:
constexpr bool operator== (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
Two pairs of the same type are equal iff their members are equal.
operator<β signature:
constexpr bool operator< (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
operator!=β signature:
constexpr bool operator!= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
Uses operator== to find the result.
operator>β signature:
constexpr bool operator> (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
Uses operator< to find the result.
operator<=β signature:
constexpr bool operator<= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
Uses operator< to find the result.
operator>=β signature:
constexpr bool operator>= (const pair< _Iterator1, _Iterator2 > &__x, const pair< _Iterator1, _Iterator2 > &__y)
Uses operator< to find the result.
π 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.
π§ Member Typedef Documentation π§
typedef _Iterator1 std::pair< _Iterator1 , _Iterator2 >::first_type[inherited]β the type of the first member.typedef _Iterator2 std::pair< _Iterator1 , _Iterator2 >::second_type[inherited]β the type of the second member.
π Member Function Documentation π
constexpr void std::pair< _Iterator1 , _Iterator2 >::swap (pair< _Iterator1, _Iterator2 > & __p) [inline], [constexpr], [noexcept], [inherited]β swap the first members and then the second members.
π₯ Friends And Related Symbol Documentation π₯
make_pairβ a convenience wrapper for creating a pair from two objects.
constexpr pair< typename __decay_and_strip< _Iterator1 >::__type, typename __decay_and_strip< _Iterator2 >::__type > make_pair (_Iterator1 && __x, _Iterator2 && __y) [related]
Parameters: __x is the first object. __y is the 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.
operator!=β usesoperator==to find the result.
constexpr bool operator!= (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
operator<β defines a lexicographical order for pairs.
constexpr bool operator< (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
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.
operator<=β usesoperator<to find the result.
constexpr bool operator<= (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
operator==β two pairs of the same type are equal iff their members are equal.
constexpr bool operator== (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
operator>β usesoperator<to find the result.
constexpr bool operator> (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
operator>=β usesoperator<to find the result.
constexpr bool operator>= (const pair< _Iterator1 , _Iterator2 > & __x, const pair< _Iterator1 , _Iterator2 > & __y) [related]
swapoverload for pairs β callsstd::pair::swap().
constexpr enable_if< __and_< __is_swappable< _Iterator1 >, __is_swappable< _Iterator2 > >::value >::type swap (pair< _Iterator1 , _Iterator2 > & __x, pair< _Iterator1 , _Iterator2 > & __y) [related]
Note: thisstd::swapoverload is not declared in C++03 mode, which has performance implications, e.g. seehttps://gcc.gnu.org/PR38466.
π Member Data Documentation π
_Iterator1 std::pair< _Iterator1 , _Iterator2 >::first[inherited]β the first member._Iterator2 std::pair< _Iterator1 , _Iterator2 >::second[inherited]β the second member.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
Mwah π β cute little footer sign-off: this page is from libstdc++ (the source/version in the generated footer), and the date is whatever date the generated footer carries β yes, the long title squished the footer into a little 3cxx puddle, but she still ate π
β¨
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms