Skip to content
Flecs v4.1
mixin.inl
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/enum/mixin.inl
3 * @brief Enum world mixin.
4 */
5
6/** Convert an enum constant to an entity.
7 *
8 * @memberof flecs::world
9 * @ingroup cpp_entities
10 */
11template <typename E, if_t< is_enum<E>::value > = 0>
untyped_component & constant(const char *name, T value)
Add a constant.
Entity.
Definition entity.hpp:30
flecs::entity to_entity(E constant) const
Convert an enum constant to an entity.