KTL
Loading...
Searching...
No Matches
ktl::ipair_iterator< K, I > Class Template Reference

Wraps an iterator to return an index along with the value. More...

#include <ipair.h>

Public Types

using value_type = ipair_value< K, V >
 
using pointer = value_type *
 
using reference = value_type &
 

Public Member Functions

 ipair_iterator (I &&iterator) noexcept(std::is_nothrow_default_constructible_v< K > &&std::is_nothrow_move_constructible_v< I >)
 
value_type operator* () const noexcept(std::is_nothrow_constructible_v< value_type, K, I > &&noexcept(*std::declval< I & >()))
 
value_type operator-> () const noexcept(std::is_nothrow_constructible_v< value_type, K, I > &&noexcept(*std::declval< I & >()))
 
ipair_iteratoroperator++ () noexcept(noexcept(++std::declval< K & >()) &&noexcept(++std::declval< I & >()))
 
template<typename IT = I>
std::enable_if_t< std::is_copy_constructible_v< ipair_iterator< K, IT > >, ipair_iteratoroperator++ (int) noexcept(std::is_nothrow_copy_constructible_v< ipair_iterator > &&noexcept(++std::declval< K & >()) &&noexcept(++std::declval< I & >()))
 
template<typename IT = I>
std::enable_if_t< detail::is_decrementable_v< IT >, ipair_iterator & > operator-- () noexcept(noexcept(--std::declval< K & >()) &&noexcept(--std::declval< I & >()))
 
template<typename IT = I>
std::enable_if_t< std::is_copy_constructible_v< ipair_iterator< K, IT > > &&detail::is_decrementable_v< IT >, ipair_iteratoroperator-- (int) noexcept(std::is_nothrow_copy_constructible_v< ipair_iterator > &&noexcept(--std::declval< K & >()) &&noexcept(--std::declval< I & >()))
 
bool operator== (const ipair_iterator &b) const noexcept(noexcept(std::declval< const I & >()==std::declval< const I & >()))
 
bool operator!= (const ipair_iterator &b) const noexcept(noexcept(std::declval< const I & >() !=std::declval< const I & >()))
 

Detailed Description

template<typename K, typename I>
class ktl::ipair_iterator< K, I >

Wraps an iterator to return an index along with the value.

Template Parameters
KThe index typ
IThe iterator type

Member Typedef Documentation

◆ pointer

template<typename K , typename I >
using ktl::ipair_iterator< K, I >::pointer = value_type*

◆ reference

template<typename K , typename I >
using ktl::ipair_iterator< K, I >::reference = value_type&

◆ value_type

template<typename K , typename I >
using ktl::ipair_iterator< K, I >::value_type = ipair_value<K, V>

Constructor & Destructor Documentation

◆ ipair_iterator()

template<typename K , typename I >
ktl::ipair_iterator< K, I >::ipair_iterator ( I &&  iterator)
inlinenoexcept

Member Function Documentation

◆ operator!=()

template<typename K , typename I >
bool ktl::ipair_iterator< K, I >::operator!= ( const ipair_iterator< K, I > &  b) const
inlinenoexcept

◆ operator*()

template<typename K , typename I >
value_type ktl::ipair_iterator< K, I >::operator* ( ) const
inlinenoexcept

◆ operator++() [1/2]

template<typename K , typename I >
ipair_iterator & ktl::ipair_iterator< K, I >::operator++ ( )
inlinenoexcept

◆ operator++() [2/2]

template<typename K , typename I >
template<typename IT = I>
std::enable_if_t< std::is_copy_constructible_v< ipair_iterator< K, IT > >, ipair_iterator > ktl::ipair_iterator< K, I >::operator++ ( int  )
inlinenoexcept

◆ operator--() [1/2]

template<typename K , typename I >
template<typename IT = I>
std::enable_if_t< detail::is_decrementable_v< IT >, ipair_iterator & > ktl::ipair_iterator< K, I >::operator-- ( )
inlinenoexcept

◆ operator--() [2/2]

template<typename K , typename I >
template<typename IT = I>
std::enable_if_t< std::is_copy_constructible_v< ipair_iterator< K, IT > > &&detail::is_decrementable_v< IT >, ipair_iterator > ktl::ipair_iterator< K, I >::operator-- ( int  )
inlinenoexcept

◆ operator->()

template<typename K , typename I >
value_type ktl::ipair_iterator< K, I >::operator-> ( ) const
inlinenoexcept

◆ operator==()

template<typename K , typename I >
bool ktl::ipair_iterator< K, I >::operator== ( const ipair_iterator< K, I > &  b) const
inlinenoexcept

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