1 #ifndef ENTT_META_RANGE_HPP
2 #define ENTT_META_RANGE_HPP
6 #include "../core/iterator.hpp"
17 template<
typename Type,
typename Node>
18 struct meta_range_iterator final {
19 using difference_type = std::ptrdiff_t;
20 using value_type = Type;
21 using pointer = input_iterator_pointer<value_type>;
22 using reference = value_type;
23 using iterator_category = std::input_iterator_tag;
24 using node_type = Node;
26 meta_range_iterator() ENTT_NOEXCEPT
29 meta_range_iterator(node_type *head) ENTT_NOEXCEPT
32 meta_range_iterator &operator++() ENTT_NOEXCEPT {
33 return (it = it->next), *
this;
36 meta_range_iterator operator++(
int) ENTT_NOEXCEPT {
37 meta_range_iterator orig = *
this;
38 return ++(*this), orig;
41 [[nodiscard]] reference operator*() const ENTT_NOEXCEPT {
45 [[nodiscard]] pointer operator->() const ENTT_NOEXCEPT {
49 [[nodiscard]]
bool operator==(
const meta_range_iterator &other)
const ENTT_NOEXCEPT {
50 return it == other.it;
53 [[nodiscard]]
bool operator!=(
const meta_range_iterator &other)
const ENTT_NOEXCEPT {
54 return !(*
this == other);
73 template<
typename Type,
typename Node =
typename Type::node_type>
78 using iterator = internal::meta_range_iterator<Type, Node>;
constexpr bool operator==(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
Compares two hashed strings.
bool operator!=(const basic_any< Len, Align > &lhs, const basic_any< Len, Align > &rhs)
Checks if two wrappers differ in their content.