libstdc++
__gnu_parallel::_GuardedIterator< _RAIter, _Compare > Class Template Reference

Public Member Functions

 _GuardedIterator (_RAIter __begin, _RAIter __end, _Compare &__comp)
 
 operator _RAIter () const
 
std::iterator_traits< _RAIter >::value_type & operator* () const
 
_GuardedIterator< _RAIter, _Compare > & operator++ ()
 

Friends

bool operator< (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, _Compare > &__bi2)
 
bool operator<= (const _GuardedIterator< _RAIter, _Compare > &__bi1, const _GuardedIterator< _RAIter, _Compare > &__bi2)
 

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.

The implicit supremum comes with a performance cost.

Deriving from _RAIter is not possible since _RAIter need not be a class.

Definition at line 73 of file multiway_merge.h.

Constructor & Destructor Documentation

◆ _GuardedIterator()

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.

Parameters
__beginBegin iterator of sequence.
__endEnd iterator of sequence.
__compComparator provided for associated overloaded compare operators.

Definition at line 91 of file multiway_merge.h.

Member Function Documentation

◆ operator _RAIter()

template<typename _RAIter , typename _Compare >
__gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator _RAIter ( ) const
inline

Convert to wrapped iterator.

Returns
Wrapped iterator.

Definition at line 112 of file multiway_merge.h.

◆ operator*()

template<typename _RAIter , typename _Compare >
std::iterator_traits<_RAIter>::value_type& __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator* ( ) const
inline

Dereference operator.

Returns
Referenced element.

Definition at line 107 of file multiway_merge.h.

◆ operator++()

template<typename _RAIter , typename _Compare >
_GuardedIterator<_RAIter, _Compare>& __gnu_parallel::_GuardedIterator< _RAIter, _Compare >::operator++ ( )
inline

Pre-increment operator.

Returns
This.

Definition at line 98 of file multiway_merge.h.

Friends And Related Function Documentation

◆ operator<

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.

Parameters
__bi1First iterator.
__bi2Second iterator.
Returns
true if less.

Definition at line 119 of file multiway_merge.h.

◆ operator<=

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.

Parameters
__bi1First iterator.
__bi2Second iterator.
Returns
True if less equal.

Definition at line 134 of file multiway_merge.h.


The documentation for this class was generated from the following file: