EnTT 4.0.0
Loading...
Searching...
No Matches
entt::iota_iterator< Type > Struct Template Referencefinal

Plain iota iterator (waiting for C++20). More...

#include <iterator.hpp>

Public Types

using value_type = Type
 Value type, likely an integral one.
using pointer = void
 Invalid pointer type.
using reference = value_type
 Non-reference type, same as value type.
using difference_type = stl::ptrdiff_t
 Difference type.
using iterator_category = stl::input_iterator_tag
 Iterator category.

Public Member Functions

constexpr iota_iterator () noexcept
 Default constructor.
constexpr iota_iterator (const value_type init) noexcept
 Constructs an iota iterator from a given value.
constexpr iota_iteratoroperator++ () noexcept
 Pre-increment operator.
constexpr iota_iterator operator++ (int) noexcept
 Post-increment operator.
constexpr reference operator* () const noexcept
 Dereference operator.
constexpr bool operator== (const iota_iterator &other) const noexcept
 Comparison operator.

Detailed Description

template<stl::integral Type>
struct entt::iota_iterator< Type >

Plain iota iterator (waiting for C++20).

Template Parameters
TypeValue type.

Definition at line 58 of file iterator.hpp.

Member Typedef Documentation

◆ difference_type

template<stl::integral Type>
using entt::iota_iterator< Type >::difference_type = stl::ptrdiff_t

Difference type.

Definition at line 66 of file iterator.hpp.

◆ iterator_category

template<stl::integral Type>
using entt::iota_iterator< Type >::iterator_category = stl::input_iterator_tag

Iterator category.

Definition at line 68 of file iterator.hpp.

◆ pointer

template<stl::integral Type>
using entt::iota_iterator< Type >::pointer = void

Invalid pointer type.

Definition at line 62 of file iterator.hpp.

◆ reference

template<stl::integral Type>
using entt::iota_iterator< Type >::reference = value_type

Non-reference type, same as value type.

Definition at line 64 of file iterator.hpp.

◆ value_type

template<stl::integral Type>
using entt::iota_iterator< Type >::value_type = Type

Value type, likely an integral one.

Definition at line 60 of file iterator.hpp.

Constructor & Destructor Documentation

◆ iota_iterator() [1/2]

template<stl::integral Type>
entt::iota_iterator< Type >::iota_iterator ( )
inlineconstexprnoexcept

Default constructor.

Definition at line 71 of file iterator.hpp.

◆ iota_iterator() [2/2]

template<stl::integral Type>
entt::iota_iterator< Type >::iota_iterator ( const value_type init)
inlineconstexprnoexcept

Constructs an iota iterator from a given value.

Parameters
initThe initial value assigned to the iota iterator.

Definition at line 78 of file iterator.hpp.

Member Function Documentation

◆ operator*()

template<stl::integral Type>
reference entt::iota_iterator< Type >::operator* ( ) const
inlinenodiscardconstexprnoexcept

Dereference operator.

Returns
The underlying value.

Definition at line 102 of file iterator.hpp.

◆ operator++() [1/2]

template<stl::integral Type>
iota_iterator & entt::iota_iterator< Type >::operator++ ( )
inlineconstexprnoexcept

Pre-increment operator.

Returns
This iota iterator.

Definition at line 85 of file iterator.hpp.

◆ operator++() [2/2]

template<stl::integral Type>
iota_iterator entt::iota_iterator< Type >::operator++ ( int )
inlineconstexprnoexcept

Post-increment operator.

Returns
This iota iterator.

Definition at line 93 of file iterator.hpp.

◆ operator==()

template<stl::integral Type>
bool entt::iota_iterator< Type >::operator== ( const iota_iterator< Type > & other) const
inlinenodiscardconstexprnoexcept

Comparison operator.

Parameters
otherA properly initialized iota iterator.
Returns
True if the two iterators are identical, false otherwise.

Definition at line 111 of file iterator.hpp.


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