EnTT 3.13.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
entt::iterable_adaptor< It, Sentinel > Struct Template Referencefinal

Utility class to create an iterable object from a pair of iterators. More...

#include <iterator.hpp>

Public Types

using value_type = typename std::iterator_traits< It >::value_type
 Value type.
 
using iterator = It
 Iterator type.
 
using sentinel = Sentinel
 Sentinel type.
 

Public Member Functions

constexpr iterable_adaptor () noexcept(std::is_nothrow_default_constructible_v< iterator > &&std::is_nothrow_default_constructible_v< sentinel >)
 Default constructor.
 
constexpr iterable_adaptor (iterator from, sentinel to) noexcept(std::is_nothrow_move_constructible_v< iterator > &&std::is_nothrow_move_constructible_v< sentinel >)
 Creates an iterable object from a pair of iterators.
 
constexpr iterator begin () const noexcept
 Returns an iterator to the beginning.
 
constexpr sentinel end () const noexcept
 Returns an iterator to the end.
 
constexpr iterator cbegin () const noexcept
 Returns an iterator to the beginning.
 
constexpr sentinel cend () const noexcept
 Returns an iterator to the end.
 

Detailed Description

template<typename It, typename Sentinel = It>
struct entt::iterable_adaptor< It, Sentinel >

Utility class to create an iterable object from a pair of iterators.

Template Parameters
ItType of iterator.
SentinelType of sentinel.

Definition at line 141 of file iterator.hpp.

Member Typedef Documentation

◆ iterator

template<typename It , typename Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::iterator = It

Iterator type.

Definition at line 145 of file iterator.hpp.

◆ sentinel

template<typename It , typename Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::sentinel = Sentinel

Sentinel type.

Definition at line 147 of file iterator.hpp.

◆ value_type

template<typename It , typename Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::value_type = typename std::iterator_traits<It>::value_type

Value type.

Definition at line 143 of file iterator.hpp.

Constructor & Destructor Documentation

◆ iterable_adaptor() [1/2]

template<typename It , typename Sentinel = It>
constexpr entt::iterable_adaptor< It, Sentinel >::iterable_adaptor ( )
inlineconstexprnoexcept

Default constructor.

Definition at line 150 of file iterator.hpp.

◆ iterable_adaptor() [2/2]

template<typename It , typename Sentinel = It>
constexpr entt::iterable_adaptor< It, Sentinel >::iterable_adaptor ( iterator  from,
sentinel  to 
)
inlineconstexprnoexcept

Creates an iterable object from a pair of iterators.

Parameters
fromBegin iterator.
toEnd iterator.

Definition at line 159 of file iterator.hpp.

Member Function Documentation

◆ begin()

template<typename It , typename Sentinel = It>
constexpr iterator entt::iterable_adaptor< It, Sentinel >::begin ( ) const
inlineconstexprnoexcept

Returns an iterator to the beginning.

Returns
An iterator to the first element of the range.

Definition at line 167 of file iterator.hpp.

◆ cbegin()

template<typename It , typename Sentinel = It>
constexpr iterator entt::iterable_adaptor< It, Sentinel >::cbegin ( ) const
inlineconstexprnoexcept

Returns an iterator to the beginning.

Returns
An iterator to the first element of the range.

Definition at line 181 of file iterator.hpp.

◆ cend()

template<typename It , typename Sentinel = It>
constexpr sentinel entt::iterable_adaptor< It, Sentinel >::cend ( ) const
inlineconstexprnoexcept

Returns an iterator to the end.

Returns
An iterator to the element following the last element of the range.

Definition at line 186 of file iterator.hpp.

◆ end()

template<typename It , typename Sentinel = It>
constexpr sentinel entt::iterable_adaptor< It, Sentinel >::end ( ) const
inlineconstexprnoexcept

Returns an iterator to the end.

Returns
An iterator to the element following the last element of the range.

Definition at line 176 of file iterator.hpp.


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