EnTT 4.0.0
Loading...
Searching...
No Matches
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 = stl::iterator_traits<It>::value_type
 Value type.
using iterator = It
 Iterator type.
using sentinel = Sentinel
 Sentinel type.

Public Member Functions

constexpr iterable_adaptor () noexcept(stl::is_nothrow_default_constructible_v< iterator > &&stl::is_nothrow_default_constructible_v< sentinel >)
 Default constructor.
constexpr iterable_adaptor (iterator from, sentinel to) noexcept(stl::is_nothrow_move_constructible_v< iterator > &&stl::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<stl::input_or_output_iterator It, stl::sentinel_for< It > 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 125 of file iterator.hpp.

Member Typedef Documentation

◆ iterator

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::iterator = It

Iterator type.

Definition at line 129 of file iterator.hpp.

◆ sentinel

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::sentinel = Sentinel

Sentinel type.

Definition at line 131 of file iterator.hpp.

◆ value_type

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
using entt::iterable_adaptor< It, Sentinel >::value_type = stl::iterator_traits<It>::value_type

Value type.

Definition at line 127 of file iterator.hpp.

Constructor & Destructor Documentation

◆ iterable_adaptor() [1/2]

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
entt::iterable_adaptor< It, Sentinel >::iterable_adaptor ( )
inlineconstexprnoexcept

Default constructor.

Definition at line 134 of file iterator.hpp.

◆ iterable_adaptor() [2/2]

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
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 143 of file iterator.hpp.

Member Function Documentation

◆ begin()

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
iterator entt::iterable_adaptor< It, Sentinel >::begin ( ) const
inlinenodiscardconstexprnoexcept

Returns an iterator to the beginning.

Returns
An iterator to the first element of the range.

Definition at line 151 of file iterator.hpp.

◆ cbegin()

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
iterator entt::iterable_adaptor< It, Sentinel >::cbegin ( ) const
inlinenodiscardconstexprnoexcept

Returns an iterator to the beginning.

Returns
An iterator to the first element of the range.

Definition at line 165 of file iterator.hpp.

◆ cend()

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
sentinel entt::iterable_adaptor< It, Sentinel >::cend ( ) const
inlinenodiscardconstexprnoexcept

Returns an iterator to the end.

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

Definition at line 170 of file iterator.hpp.

◆ end()

template<stl::input_or_output_iterator It, stl::sentinel_for< It > Sentinel = It>
sentinel entt::iterable_adaptor< It, Sentinel >::end ( ) const
inlinenodiscardconstexprnoexcept

Returns an iterator to the end.

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

Definition at line 160 of file iterator.hpp.


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