1 #ifndef ENTT_META_RANGE_HPP
2 #define ENTT_META_RANGE_HPP
17 template<
typename Type,
typename Node =
typename Type::node_type>
19 struct range_iterator {
20 using difference_type = std::ptrdiff_t;
21 using value_type = Type;
23 using reference = value_type;
24 using iterator_category = std::input_iterator_tag;
27 range_iterator() ENTT_NOEXCEPT =
default;
29 range_iterator(
node_type *head) ENTT_NOEXCEPT
33 range_iterator & operator++() ENTT_NOEXCEPT {
34 return (it = it->next), *
this;
37 range_iterator operator++(
int) ENTT_NOEXCEPT {
38 range_iterator orig = *
this;
39 return ++(*this), orig;
42 [[nodiscard]] reference operator*()
const ENTT_NOEXCEPT {
46 [[nodiscard]]
bool operator==(
const range_iterator &other)
const ENTT_NOEXCEPT {
47 return other.it == it;
50 [[nodiscard]]
bool operator!=(
const range_iterator &other)
const ENTT_NOEXCEPT {
51 return !(*
this == other);
bool operator!=(const basic_any< Len, Align > &lhs, const basic_any< Len, Align > &rhs)
Checks if two wrappers differ in their content.
constexpr bool operator==(const Entity entity, const null_t other)
Compares a null object and an entity identifier of any type.