__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 isvoid, 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_typeandsecond_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
firstthensecond, 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. π
π¦ Related Symbols π¦
(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.
(π―ββοΈ)
π Friends And Related Symbol Documentation π
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