KTL
Loading...
Searching...
No Matches
ktl::ipair_iterable< K, C > Class Template Reference

Wraps an iterable object for use with indexed iterators. More...

#include <ipair.h>

Public Types

using iterator = ipair_iterator< K, begin_type >
 
using const_iterator = ipair_iterator< K, begin_const_type >
 

Public Member Functions

template<typename V >
 ipair_iterable (V &&container) noexcept(std::is_nothrow_constructible_v< C, V >)
 
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::decay_t< V > >, iteratorbegin () noexcept(noexcept(std::declval< V & >().begin()) &&noexcept(iterator(std::declval< begin_type >())))
 
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::decay_t< V > >, iteratorend () noexcept(noexcept(std::declval< V & >().end()) &&noexcept(iterator(std::declval< begin_type >())))
 
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::add_const_t< std::decay_t< V > > >, const_iteratorbegin () const noexcept(noexcept(std::declval< const V & >().begin()) &&noexcept(const_iterator(std::declval< begin_type >())))
 
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::add_const_t< std::decay_t< V > > >, const_iteratorend () const noexcept(noexcept(std::declval< const V & >().end()) &&noexcept(const_iterator(std::declval< begin_type >())))
 

Detailed Description

template<typename K, typename C>
class ktl::ipair_iterable< K, C >

Wraps an iterable object for use with indexed iterators.

Template Parameters
KThe index type
CThe wrapped container type

Member Typedef Documentation

◆ const_iterator

template<typename K , typename C >
using ktl::ipair_iterable< K, C >::const_iterator = ipair_iterator<K, begin_const_type>

◆ iterator

template<typename K , typename C >
using ktl::ipair_iterable< K, C >::iterator = ipair_iterator<K, begin_type>

Constructor & Destructor Documentation

◆ ipair_iterable()

template<typename K , typename C >
template<typename V >
ktl::ipair_iterable< K, C >::ipair_iterable ( V &&  container)
inlinenoexcept

Member Function Documentation

◆ begin() [1/2]

template<typename K , typename C >
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::add_const_t< std::decay_t< V > > >, const_iterator > ktl::ipair_iterable< K, C >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<typename K , typename C >
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::decay_t< V > >, iterator > ktl::ipair_iterable< K, C >::begin ( )
inlinenoexcept

◆ end() [1/2]

template<typename K , typename C >
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::add_const_t< std::decay_t< V > > >, const_iterator > ktl::ipair_iterable< K, C >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<typename K , typename C >
template<typename V = C>
std::enable_if_t< detail::is_iterable_v< std::decay_t< V > >, iterator > ktl::ipair_iterable< K, C >::end ( )
inlinenoexcept

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