ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::KeyIterator< I > Class Template Reference

the member first of what the iterator I reads, with the category of I up to bidirectional More...

#include <ADS/Iterators.h>

Public types

using reference
 a constant reference to a key
using value_type = std::remove_cvref_t< reference >
 the keys
using difference_type = std::iter_difference_t< I >
 the distances, those of I
using iterator_concept
 bidirectional if I is, forward otherwise
using iterator_category = iterator_concept
 as iterator_concept

Public member functions

 KeyIterator (void)=default
 an iterator on nothing
 KeyIterator (I i)
 on the key of what i reads
reference operator* (void) const
 the key
const value_type * operator-> (void) const
 the address of the key
KeyIterator & operator++ (void)
 to the next key
KeyIterator operator++ (int)
 to the next key, returning the iterator before the step
KeyIterator & operator-- (void)
 to the previous key
KeyIterator operator-- (int)
 to the previous key, returning the iterator before the step
bool operator== (const KeyIterator &o) const =default
 equal when the iterators on the pairs are

Detailed description

template<std::forward_iterator I>
class ADS::KeyIterator< I >

the member first of what the iterator I reads, with the category of I up to bidirectional

Member typedef documentation

◆ difference_type

template<std::forward_iterator I>
using ADS::KeyIterator< I >::difference_type = std::iter_difference_t< I >

the distances, those of I

◆ iterator_category

template<std::forward_iterator I>
using ADS::KeyIterator< I >::iterator_category = iterator_concept

◆ iterator_concept

template<std::forward_iterator I>
using ADS::KeyIterator< I >::iterator_concept
Initial value:
std::conditional_t< std::bidirectional_iterator< I > ,
std::bidirectional_iterator_tag ,
std::forward_iterator_tag >

bidirectional if I is, forward otherwise

◆ reference

template<std::forward_iterator I>
using ADS::KeyIterator< I >::reference
Initial value:
const std::remove_cvref_t< decltype( ( *std::declval< I >() ).first ) > &

a constant reference to a key

◆ value_type

template<std::forward_iterator I>
using ADS::KeyIterator< I >::value_type = std::remove_cvref_t< reference >

the keys

Constructor and destructor documentation

◆ KeyIterator() [1/2]

template<std::forward_iterator I>
ADS::KeyIterator< I >::KeyIterator ( void )
default

an iterator on nothing

◆ KeyIterator() [2/2]

template<std::forward_iterator I>
ADS::KeyIterator< I >::KeyIterator ( I i)
inlineexplicit

on the key of what i reads

Member function documentation

◆ operator*()

template<std::forward_iterator I>
reference ADS::KeyIterator< I >::operator* ( void ) const
inline

the key

◆ operator++() [1/2]

template<std::forward_iterator I>
KeyIterator ADS::KeyIterator< I >::operator++ ( int )
inline

to the next key, returning the iterator before the step

◆ operator++() [2/2]

template<std::forward_iterator I>
KeyIterator & ADS::KeyIterator< I >::operator++ ( void )
inline

to the next key

◆ operator--() [1/2]

template<std::forward_iterator I>
KeyIterator ADS::KeyIterator< I >::operator-- ( int )
inline

to the previous key, returning the iterator before the step

◆ operator--() [2/2]

template<std::forward_iterator I>
KeyIterator & ADS::KeyIterator< I >::operator-- ( void )
inline

to the previous key

◆ operator->()

template<std::forward_iterator I>
const value_type * ADS::KeyIterator< I >::operator-> ( void ) const
inline

the address of the key

◆ operator==()

template<std::forward_iterator I>
bool ADS::KeyIterator< I >::operator== ( const KeyIterator< I > & o) const
default

equal when the iterators on the pairs are


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