1#ifndef ENTT_CORE_ITERATOR_HPP
2#define ENTT_CORE_ITERATOR_HPP
4#include "../stl/concepts.hpp"
5#include "../stl/cstddef.hpp"
6#include "../stl/iterator.hpp"
7#include "../stl/memory.hpp"
8#include "../stl/type_traits.hpp"
9#include "../stl/utility.hpp"
17template<
typename Type>
31 : value{
stl::move(val)} {}
38 return stl::addressof(value);
57template<stl::
integral Type>
86 return ++current, *
this;
95 return ++(*this), orig;
112 return current == other.current;
124template<stl::input_or_output_iterator It, stl::sentinel_for<It> Sentinel = It>
144 : first{
stl::move(from)},
145 last{
stl::move(to)} {}
Custom EnTT namespace for the standard template library.
constexpr iota_iterator(const value_type init) noexcept
Constructs an iota iterator from a given value.
constexpr iota_iterator operator++(int) noexcept
Post-increment operator.
constexpr reference operator*() const noexcept
Dereference operator.
value_type reference
Non-reference type, same as value type.
constexpr iota_iterator & operator++() noexcept
Pre-increment operator.
constexpr bool operator==(const iota_iterator &other) const noexcept
Comparison operator.
void pointer
Invalid pointer type.
stl::ptrdiff_t difference_type
Difference type.
constexpr iota_iterator() noexcept
Default constructor.
Type value_type
Value type, likely an integral one.
stl::input_iterator_tag iterator_category
Iterator category.
constexpr sentinel cend() const noexcept
Returns an iterator to the end.
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.
stl::iterator_traits< It >::value_type value_type
Value type.
It iterator
Iterator type.
Sentinel sentinel
Sentinel type.
constexpr iterator cbegin() const noexcept
Returns an iterator to the beginning.
constexpr sentinel end() const noexcept
Returns an iterator to the end.
constexpr iterable_adaptor() noexcept(stl::is_nothrow_default_constructible_v< iterator > &&stl::is_nothrow_default_constructible_v< sentinel >)
Default constructor.
constexpr iterator begin() const noexcept
Returns an iterator to the beginning.