__GNU_PARALLEL::_ITERATORPAIR(3)

πŸ’– NAME πŸ’–

okay so bestie, welcome to the Library Functions Manual (section 3). The main character today is __gnu_parallel::_IteratorPair< _Iterator1, _Iterator2, _IteratorCategory >. And what is it? literally a pair of iterators. The usual iterator operations are applied to both child iterators. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

First things first, you gotta include this:

#include <iterator.h>

And it inherits from std::pair< _Iterator1, _Iterator2 >. iykyk ✨

🌸 Public Types 🌸

  • typedef std::iterator_traits< _Iterator1 > _TraitsType β€” the traits type, slay.
  • typedef _TraitsType::difference_type difference_type β€” the difference type, no cap.
  • typedef _Iterator1 first_type β€” The type of the first member. main character energy.
  • typedef _IteratorCategory iterator_category β€” the iterator category, iconic.
  • typedef _IteratorPair * pointer β€” pointer to the pair, obsessed.
  • typedef _IteratorPair & reference β€” reference to the pair, periodt.
  • typedef _Iterator2 second_type β€” The type of the second member. also main character energy.
  • typedef void value_type β€” value type is void, and that's the tea. πŸ“

πŸ”₯ Public Member Functions πŸ”₯

okay so this list is LONG, and the manpage literally duplicated a bunch of entries. not me fixing it, because every single detail stays. So here's the raw, verbatim list, bestie. Don't come for me about the duplicates β€” the manpage did that. πŸ’€

_IteratorPair (const _Iterator1 &__first, const _Iterator2 &__second)
constexpr explicit (!_S_convertible< _U1 &, _U2 & >()) pair(pair< _U1
constexpr explicit (!_S_convertible< _U1 &, _U2 & >()) pair(pair< _U1
constexpr _U2 &&constexpr explicit (!_S_convertible< _U1 &, _U2 & >())
    pair(pair< _U1
    Converting constructor from a non-const pair<U1, U2> lvalue.
constexpr _U2 &&constexpr explicit (!_S_convertible< _U1 &, _U2 & >())
    pair(pair< _U1
    Converting constructor from a non-const pair<U1, U2> lvalue.
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(_U1 &&
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(_U1 &&
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(_U1 &&__x
    Constructor accepting two values of arbitrary types.
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(_U1 &&__x
    Constructor accepting two values of arbitrary types.
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(pair< _U1
constexpr explicit (!_S_convertible< _U1, _U2 >()) pair(pair< _U1
constexpr _U2 &constexpr explicit (!_S_convertible< _U1, _U2 >())
    pair(pair< _U1
    Converting constructor from a non-const pair<U1, U2> rvalue.
constexpr _U2 &constexpr explicit (!_S_convertible< _U1, _U2 >())
    pair(pair< _U1
    Converting constructor from a non-const pair<U1, U2> rvalue.
constexpr explicit (!_S_convertible< const _Iterator1 &, const
    _Iterator2 & >()) pair(const type_identity_t< _Iterator1 > &__x
    Constructor accepting lvalues of first_type and second_type.
constexpr explicit (!_S_convertible< const _Iterator1 &, const
    _Iterator2 & >()) pair(const type_identity_t< _Iterator1 > &__x
    Constructor accepting lvalues of first_type and second_type.
constexpr explicit (!_S_convertible< const _U1 &, const _U2 & >())
    pair(const pair< _U1
constexpr explicit (!_S_convertible< const _U1 &, const _U2 & >())
    pair(const pair< _U1
constexpr _U2 &&constexpr explicit (!_S_convertible< const _U1 &, const
    _U2 & >()) pair(const pair< _U1
    Converting constructor from a const pair<U1, U2> lvalue.
constexpr _U2 &&constexpr explicit (!_S_convertible< const _U1 &, const
    _U2 & >()) pair(const pair< _U1
    Converting constructor from a const pair<U1, U2> lvalue.
constexpr explicit (!_S_convertible< const _U1, const _U2 >())
    pair(const pair< _U1
constexpr explicit (!_S_convertible< const _U1, const _U2 >())
    pair(const pair< _U1
constexpr _U2 &constexpr explicit (!_S_convertible< const _U1, const _U2
    >()) pair(const pair< _U1
    Converting constructor from a const pair<U1, U2> rvalue.
constexpr _U2 &constexpr explicit (!_S_convertible< const _U1, const _U2
    >()) pair(const pair< _U1
    Converting constructor from a const pair<U1, U2> rvalue.
constexpr explicit (!_S_convertible_from_pair_like< _UPair >())
    pair(_UPair &&)=delete
constexpr explicit (!_S_convertible_from_pair_like< _UPair >())
    pair(_UPair &&)=delete
constexpr _U2 &&constexpr explicit (!_S_convertible_from_pair_like<
    _UPair >()) pair(_UPair &&__p)
constexpr _U2 &&constexpr explicit (!_S_convertible_from_pair_like<
    _UPair >()) pair(_UPair &&__p)
constexpr explicit (__not_< __and_<
    __is_implicitly_default_constructible< _Iterator1 >,
    __is_implicitly_default_constructible< _Iterator2 > > >()) pair()
    noexcept(is_nothrow_default_constructible_v< _Iterator1 >
    &&is_nothrow_default_constructible_v< _Iterator2 >)
    Default constructor.
constexpr explicit (__not_< __and_<
    __is_implicitly_default_constructible< _Iterator1 >,
    __is_implicitly_default_constructible< _Iterator2 > > >()) pair()
    noexcept(is_nothrow_default_constructible_v< _Iterator1 >
    &&is_nothrow_default_constructible_v< _Iterator2 >)
    Default constructor.
constexpr _U2 &&constexpr _U2 &__p noexcept (_S_nothrow_constructible<
    _U1 &, _U2 & >())
constexpr _U2 &&constexpr _U2 &__p noexcept (_S_nothrow_constructible<
    _U1 &, _U2 & >())
constexpr _U2 &constexpr _U2 &&__p noexcept (_S_nothrow_constructible<
    _U1, _U2 >())
constexpr _U2 &constexpr _U2 &&__p noexcept (_S_nothrow_constructible<
    _U1, _U2 >())
constexpr _U2 &&__y noexcept (_S_nothrow_constructible< _U1, _U2 >())
constexpr _U2 &&__y noexcept (_S_nothrow_constructible< _U1, _U2 >())
constexpr const _Iterator2 &__y noexcept (_S_nothrow_constructible<
    const _Iterator1 &, const _Iterator2 & >())
constexpr const _Iterator2 &__y noexcept (_S_nothrow_constructible<
    const _Iterator1 &, const _Iterator2 & >())
constexpr _U2 &&constexpr _U2 &__p noexcept (_S_nothrow_constructible<
    const _U1 &, const _U2 & >())
constexpr _U2 &&constexpr _U2 &__p noexcept (_S_nothrow_constructible<
    const _U1 &, const _U2 & >())
constexpr _U2 &constexpr _U2 &&__p noexcept (_S_nothrow_constructible<
    const _U1, const _U2 >())
constexpr _U2 &constexpr _U2 &&__p noexcept (_S_nothrow_constructible<
    const _U1, const _U2 >())
operator _Iterator2 () const
_IteratorPair operator+ (difference_type __delta) const
_IteratorPair & operator++ ()
const _IteratorPair operator++ (int)
difference_type operator- (const _IteratorPair &__other) const
_IteratorPair & operator-- ()
const _IteratorPair operator-- (int)
_IteratorPair & operator= (const _IteratorPair &__other)
constexpr void swap (const pair &__p) const noexcept(__and_v<
    __is_nothrow_swappable< const _Iterator1 >, __is_nothrow_swappable<
    const _Iterator2 > >)
constexpr void swap (const pair &__p) const noexcept(__and_v<
    __is_nothrow_swappable< const _Iterator1 >, __is_nothrow_swappable<
    const _Iterator2 > >)
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.
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.

and here's what those descriptions actually mean, translated:

  • Converting constructor from a non-const pair<U1, U2> lvalue. β€” it's giving converting constructor, non-const lvalue edition. ✨
  • same again, because the manpage said it twice. no cap. πŸ’…
  • Constructor accepting two values of arbitrary types. β€” literally takes any two types, iconic.
  • same again, duplicated, and we respect the duplication. 🫢
  • Converting constructor from a non-const pair<U1, U2> rvalue. β€” non-const rvalue conversion, main character energy.
  • same again, because why not. πŸ’€
  • Constructor accepting lvalues of first_type and second_type. β€” takes lvalues of first_type and second_type, slay.
  • same again, periodt.
  • Converting constructor from a const pair<U1, U2> lvalue. β€” const lvalue conversion, obsessed.
  • same again, no notes.
  • Converting constructor from a const pair<U1, U2> rvalue. β€” const rvalue conversion, ate.
  • same again, because the manpage is the manpage. 🌸
  • Default constructor. β€” the default constructor, lowkey essential.
  • same again, duplicated. πŸ’–
  • Swap the first members and then the second members. β€” swaps first then second, iconic.
  • same again, because two is better than one. 😭

πŸ’… Public Attributes πŸ’…

  • _Iterator1 first β€” The first member. and yes, it's listed twice. πŸ‘‘
  • _Iterator1 first β€” The first member. again, bestie. the manpage said it, so I'm saying it. πŸ’–
  • _Iterator2 second β€” The second member. also twice. ✨
  • _Iterator2 second β€” The second member. yep, again. πŸ’…

(Note that these are not member symbols.)

okay so these are related, not members. iykyk.

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 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< _U1, _U2 > &__y)
    Two pairs are equal iff their members are equal.
constexpr bool operator== (const pair< _Iterator1, _Iterator2 >
    &__x, const pair< _U1, _U2 > &__y)
    Two pairs are equal iff their members are equal.
constexpr common_comparison_category_t< __detail::__synth3way_t<
    _Iterator1, _U1 >, __detail::__synth3way_t< _Iterator2, _U2 > >
    operator<=> (const pair< _Iterator1, _Iterator2 > &__x, const
    pair< _U1, _U2 > &__y)
constexpr common_comparison_category_t< __detail::__synth3way_t<
    _Iterator1, _U1 >, __detail::__synth3way_t< _Iterator2, _U2 > >
    operator<=> (const pair< _Iterator1, _Iterator2 > &__x, const
    pair< _U1, _U2 > &__y)

and the tea on those descriptions:

  • Two pairs are equal iff their members are equal. β€” literally that. equality check, iconic.
  • same again, duplicated. πŸ’–
  • the operator<=> one has no description, but it's there, and it's giving spaceship vibes. πŸš€

✨ 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.

so yes, it's a pair of iterators, and the usual iterator operations are applied to both child iterators. periodt. πŸ’…


🌸 Member Typedef Documentation 🌸

  • typedef _Iterator1 std::pair< _Iterator1, _Iterator2 >::first_type [inherited] β€” The type of the first member. inherited, and still main character. ✨
  • typedef _Iterator2 std::pair< _Iterator1, _Iterator2 >::second_type [inherited] β€” The type of the second member. also inherited, also iconic. πŸ’–

πŸ’– Member Function Documentation πŸ’–

Okay bestie, this is the big one. The manpage is so extra that it lists several of these functions twice. We are keeping every single duplicate because that's the rule. No cap. 🫢


   _U2 &&constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< _U1 &, _U2 & > ()) [constexpr],  [inherited]

Converting constructor from a non-const pair<U1, U2> lvalue.

   _U2 &&constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< _U1 &, _U2 & > ()) [constexpr],  [inherited]

Converting constructor from a non-const pair<U1, U2> lvalue.

(πŸ‘―β€β™€οΈ yes, the manpage really has this one twice)


   std::pair< _Iterator1, _Iterator2 >::explicit (!_S_convertible< _U1, _U2 >
       ()) && [constexpr],  [inherited]

Constructor accepting two values of arbitrary types.

   std::pair< _Iterator1, _Iterator2 >::explicit (!_S_convertible< _U1, _U2 >
       ()) && [constexpr],  [inherited]

Constructor accepting two values of arbitrary types.

(another twin πŸ‘―β€β™€οΈ)


   _U2 &constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< _U1, _U2 > ()) [constexpr],  [inherited]

Converting constructor from a non-const pair<U1, U2> rvalue.

   _U2 &constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< _U1, _U2 > ()) [constexpr],  [inherited]

Converting constructor from a non-const pair<U1, U2> rvalue.

(πŸ‘―β€β™€οΈ)


   std::pair< _Iterator1, _Iterator2 >::explicit (!_S_convertible< const
       _Iterator1 &, const _Iterator2 & > ()) const & [constexpr],  [inherited]

Constructor accepting lvalues of first_type and second_type.

   std::pair< _Iterator1, _Iterator2 >::explicit (!_S_convertible< const
       _Iterator1 &, const _Iterator2 & > ()) const & [constexpr],  [inherited]

Constructor accepting lvalues of first_type and second_type.

(πŸ‘―β€β™€οΈ)


   _U2 &&constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< const _U1 &, const _U2 & > ()) const [constexpr],
       [inherited]

Converting constructor from a const pair<U1, U2> lvalue.

   _U2 &&constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< const _U1 &, const _U2 & > ()) const [constexpr],
       [inherited]

Converting constructor from a const pair<U1, U2> lvalue.

(πŸ‘―β€β™€οΈ)


   _U2 &constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< const _U1, const _U2 > ()) const [constexpr],
       [inherited]

Converting constructor from a const pair<U1, U2> rvalue.

   _U2 &constexpr std::pair< _Iterator1, _Iterator2 >::explicit
       (!_S_convertible< const _U1, const _U2 > ()) const [constexpr],
       [inherited]

Converting constructor from a const pair<U1, U2> rvalue.

(πŸ‘―β€β™€οΈ)


   std::pair< _Iterator1, _Iterator2 >::explicit (__not_< __and_<
       __is_implicitly_default_constructible< _Iterator1 >,
       __is_implicitly_default_constructible< _Iterator2 > > > ()) [inline],
       [constexpr],  [noexcept],  [inherited]

Default constructor.

   std::pair< _Iterator1, _Iterator2 >::explicit (__not_< __and_<
       __is_implicitly_default_constructible< _Iterator1 >,
       __is_implicitly_default_constructible< _Iterator2 > > > ()) [inline],
       [constexpr],  [noexcept],  [inherited]

Default constructor.

(πŸ‘―β€β™€οΈ)


   void std::pair< _Iterator1, _Iterator2 >::swap (pair< _Iterator1, _Iterator2
       > & __p) [inline],  [constexpr],  [noexcept],  [inherited]

Swap the first members and then the second members.

   void std::pair< _Iterator1, _Iterator2 >::swap (pair< _Iterator1, _Iterator2
       > & __p) [inline],  [constexpr],  [noexcept],  [inherited]

Swap the first members and then the second members.

(πŸ‘―β€β™€οΈ)


These are the besties that hang out with the pair. And yes, duplicates again. We love consistency. πŸ’…

   common_comparison_category_t< __detail::__synth3way_t< _Iterator1, _U1 >,
       __detail::__synth3way_t< _Iterator2, _U2 > > operator<=> (const pair<
       _Iterator1, _Iterator2 > & __x, const pair< _U1, _U2 > & __y) [related]

Defines a lexicographical order for pairs.

For two pairs of comparable types, 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.

   common_comparison_category_t< __detail::__synth3way_t< _Iterator1, _U1 >,
       __detail::__synth3way_t< _Iterator2, _U2 > > operator<=> (const pair<
       _Iterator1, _Iterator2 > & __x, const pair< _U1, _U2 > & __y) [related]

Defines a lexicographical order for pairs.

For two pairs of comparable types, 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.

(πŸ‘―β€β™€οΈ)


   bool operator== (const pair< _Iterator1, _Iterator2 > & __x, const pair<
       _U1, _U2 > & __y) [related]

Two pairs are equal iff their members are equal.

   bool operator== (const pair< _Iterator1, _Iterator2 > & __x, const pair<
       _U1, _U2 > & __y) [related]

Two pairs are equal iff their members are equal.

(πŸ‘―β€β™€οΈ)


   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
   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

(πŸ‘―β€β™€οΈ)


πŸŽ€ Member Data Documentation πŸŽ€

The actual members. Short and sweet, but duplicated because why not. πŸ’–

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

The first member.

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

The first member.

(πŸ‘―β€β™€οΈ)

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

The second member.

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

The second member.

(πŸ‘―β€β™€οΈ)


✨ Author ✨

Generated automatically by Doxygen for libstdc++ from the source code.


And that's a wrap, bestie. This page came from libstdc++'s Doxygen for __gnu_para...Category >(3), dated as the footer says. Stay slay. πŸ’…πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms