doc: minor changes

This commit is contained in:
Michele Caini
2020-05-17 00:12:43 +02:00
parent 1a77bf49f5
commit aa756f6d68
2 changed files with 13 additions and 7 deletions

View File

@@ -2100,7 +2100,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and

View File

@@ -221,14 +221,20 @@ using member_class_t = typename member_class<Member>::type;
}
/**
* @brief Defines an enum class to use for opaque identifiers and a dedicate
* `to_integer` function to convert the identifiers to their underlying type.
* @param clazz The name to use for the enum class.
* @param type The underlying type for the enum class.
*/
#define ENTT_OPAQUE_TYPE(clazz, type)\
/**\
* @brief Defines an enum class to use for opaque identifiers and a\
* dedicate `to_integer` function to convert the identifiers to their\
* underlying type.\
* @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.
*/\
constexpr auto to_integral(const clazz id) ENTT_NOEXCEPT {\
return static_cast<std::underlying_type_t<clazz>>(id);\
}\