__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 _IteratorPair situation.
  • typedef _IteratorPair & reference β€” reference to this _IteratorPair situation.
  • typedef _Iterator2 second_type β€” the type of the second member.
  • typedef void value_type β€” yep, value_type is void.

πŸŽ€ Public Member Functions πŸŽ€

  • _IteratorPair (const _Iterator1 &__first, const _Iterator2 &__second) β€” the constructor, taking const _Iterator1 &__first and const _Iterator2 &__second.
  • operator _Iterator2 () const β€” conversion operator to _Iterator2.
  • _IteratorPair operator+ (difference_type __delta) const β€” plus operator with difference_type __delta.
  • _IteratorPair & operator++ () β€” pre-increment, returning _IteratorPair &.
  • const _IteratorPair operator++ (int) β€” post-increment, returning const _IteratorPair.
  • difference_type operator- (const _IteratorPair &__other) const β€” difference operator against const _IteratorPair &__other.
  • _IteratorPair & operator-- () β€” pre-decrement, returning _IteratorPair &.
  • const _IteratorPair operator-- (int) β€” post-decrement, returning const _IteratorPair.
  • _IteratorPair & operator= (const _IteratorPair &__other) β€” assignment from const _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.

(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, with noexcept(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.

  • 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!= β€” uses operator== 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<= β€” uses operator< 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> β€” uses operator< to find the result.
constexpr bool operator> (const pair< _Iterator1 , _Iterator2  > & __x, const pair< _Iterator1 , _Iterator2  > & __y) [related]
  • operator>= β€” uses operator< to find the result.
constexpr bool operator>= (const pair< _Iterator1 , _Iterator2  > & __x, const pair< _Iterator1 , _Iterator2  > & __y) [related]
  • swap overload for pairs β€” calls std::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: this std::swap overload is not declared in C++03 mode, which has performance implications, e.g. see https://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 πŸ’…βœ¨