EnTT 3.14.0
Loading...
Searching...
No Matches
family.hpp
1#ifndef ENTT_CORE_FAMILY_HPP
2#define ENTT_CORE_FAMILY_HPP
3
4#include "../config/config.h"
5#include "fwd.hpp"
6
7namespace entt {
8
16template<typename...>
17class family {
18 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
19 inline static ENTT_MAYBE_ATOMIC(id_type) identifier{};
20
21public:
24
26 template<typename... Type>
27 // at the time I'm writing, clang crashes during compilation if auto is used instead of family_type
28 inline static const value_type value = identifier++;
29};
30
31} // namespace entt
32
33#endif
Dynamic identifier generator.
Definition family.hpp:17
id_type value_type
Unsigned integer type.
Definition family.hpp:23
EnTT default namespace.
Definition dense_map.hpp:22
std::uint32_t id_type
Alias declaration for type identifiers.
Definition fwd.hpp:14