|
|
@@ -242,22 +242,11 @@ using member_class_t = typename member_class<Member>::type;
|
|
|
|
|
|
#define ENTT_OPAQUE_TYPE(clazz, type)\
|
|
|
/**\
|
|
|
- @brief Defines an enum class to use for opaque identifiers and a\
|
|
|
- dedicate `to_integral` function to convert the identifiers to their\
|
|
|
- underlying type.\
|
|
|
+ @brief Defines an enum class to use for opaque identifiers.\
|
|
|
@param clazz The name to use for the enum class.\
|
|
|
@param type The underlying type for the enum class.\
|
|
|
*/\
|
|
|
- enum class clazz: type {};\
|
|
|
- /**\
|
|
|
- @brief Converts an opaque type value to its underlying type.\
|
|
|
- @param id The value to convert.\
|
|
|
- @return The integral representation of the given value.\
|
|
|
- */\
|
|
|
- [[nodiscard]] constexpr auto to_integral(const clazz id) ENTT_NOEXCEPT {\
|
|
|
- return static_cast<std::underlying_type_t<clazz>>(id);\
|
|
|
- }\
|
|
|
- static_assert(true)
|
|
|
+ enum class clazz: type {}
|
|
|
|
|
|
|
|
|
#endif
|