__GNU_PARALLEL::_GUARDEDITERATOR(3cxx)
π NAME π
ok so bestie, meet __gnu_parallel::_GuardedIterator< _RAIter, _Compare > β it's an _Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons. yes that's a real sentence, and yes it's kind of iconic π
this page lives in the libstdc++ manual, section 3cxx β noted, we'll circle back at the sign-off π
β¨ SYNOPSIS β¨
#include <multiway_merge.h>
π«Ά Public Member Functions
_GuardedIterator (_RAIter __begin, _RAIter __end, _Compare &__comp)β the Constructor. Sets iterator to beginning of sequence. hi bestie πoperator _RAIter () constβ Convert to wrapped iterator.std::iterator_traits< _RAIter >::value_type & operator* () constβ Dereference operator. yes queen, get the value π_GuardedIterator< _RAIter, _Compare > & operator++ ()β Pre-increment operator.
π¦ Friends
bool operator< (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, _Compare > &__bi2)β Compare two elements referenced by guarded iterators.bool operator<= (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, _Compare > &__bi2)β Compare two elements referenced by guarded iterators.
πΈ Detailed Description πΈ
template<typename _RAIter, typename _Compare>
class __gnu_parallel::_GuardedIterator< _RAIter, _Compare >
"_Iterator wrapper supporting an implicit supremum at the end of the sequence, dominating all comparisons."
ok so real talk: the implicit supremum comes with a performance cost. π that's not me being dramatic, that's literally in the docs β the convenience has a price tag, ngl.
and why isn't this thing just derived from _RAIter like a normal class hierarchy moment? because deriving from _RAIter is not possible since _RAIter need not be a class. lowkey humbling π
π Constructor & Destructor Documentation π
_GuardedIterator (_RAIter __begin, _RAIter __end, _Compare & __comp) [inline]
template<typename _RAIter , typename _Compare >
__gnu_parallel::_GuardedIterator< _RAIter, _Compare >::_GuardedIterator
(_RAIter __begin, _RAIter __end, _Compare & __comp) [inline]
Constructor. Sets iterator to beginning of sequence. first-day-of-school energy fr fr β¨
Parameters
__beginβ Begin iterator of sequence.__endβ End iterator of sequence.__compβ Comparator provided for associated overloaded compare operators.
π Member Function Documentation π
operator _RAIter () const [inline]
template<typename _RAIter , typename _Compare >
__gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator _RAIter
() const [inline]
Convert to wrapped iterator. it's giving glow-up-to-your-true-form π¦
Returns
Wrapped iterator.
operator* () const [inline]
template<typename _RAIter , typename _Compare > std::iterator_traits<
_RAIter >::value_type & __gnu_parallel::_GuardedIterator< _RAIter,
_Compare >::operator* () const [inline]
Dereference operator. the main character of operators, honestly π
Returns
Referenced element.
operator++ () [inline]
template<typename _RAIter , typename _Compare > _GuardedIterator< _RAIter,
_Compare > & __gnu_parallel::_GuardedIterator< _RAIter, _Compare
>::operator++ () [inline]
Pre-increment operator. moving forward, always moving forward π
Returns
This.
π₯ Friends And Related Symbol Documentation π₯
bool operator< (const _GuardedIterator< _RAIter, _Compare > & __bi1, const _GuardedIterator< _RAIter, _Compare > & __bi2) [friend]
template<typename _RAIter , typename _Compare > bool operator< (const
_GuardedIterator< _RAIter, _Compare > & __bi1, const _GuardedIterator<
_RAIter, _Compare > & __bi2) [friend]
Compare two elements referenced by guarded iterators. a little comparison date, we love to see it π
Parameters
__bi1β First iterator.__bi2β Second iterator.
Returns
true if less.
bool operator<= (const _GuardedIterator< _RAIter, _Compare > & __bi1, const _GuardedIterator< _RAIter, _Compare > & __bi2) [friend]
template<typename _RAIter , typename _Compare > bool operator<= (const
_GuardedIterator< _RAIter, _Compare > & __bi1, const _GuardedIterator<
_RAIter, _Compare > & __bi2) [friend]
Compare two elements referenced by guarded iterators. same vibes, slightly more generous π
Parameters
__bi1β First iterator.__bi2β Second iterator.
Returns
true if less equal.
β Author β
Generated automatically by Doxygen for libstdc++ from the source code. not a human author, just Doxygen doing its little autogenerated thing π€β¨
ok that's the whole page, bestie β every member, every parameter, every[inline]and[friend], nothing skipped. go forth and guard those iterators π«Ά
π that's a wrap! this was the libstdc++ page for __gnu_parallel::_GuardedIterator< _RAIter, _Compare >, manual section 3cxx β mwah, slay, periodt π
π
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- 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 noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms