Merge pull request #645 from CapeLeidokos/ng_type_traits

Added standard C++ type_traits header and fixed an existing traits macro
pull/646/head
Jesse Vincent 6 years ago committed by GitHub
commit c6c1492f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,6 +36,8 @@
// explain what it does. But the explanations are good enough to actually // explain what it does. But the explanations are good enough to actually
// understand what's going on. // understand what's going on.
#define CAT3(A, B, C) A##B##C
#define DEFINE_HAS_MEMBER_TRAITS(PREFIX, MEMBER_NAME) __NL__ \ #define DEFINE_HAS_MEMBER_TRAITS(PREFIX, MEMBER_NAME) __NL__ \
__NL__ \ __NL__ \
/* This defines a templated class PREFIX##_HasMember_##MEMBER_NAME. __NL__ \ /* This defines a templated class PREFIX##_HasMember_##MEMBER_NAME. __NL__ \
@ -44,7 +46,7 @@
* string tokens to form new identifiers (here the struct name). __NL__ \ * string tokens to form new identifiers (here the struct name). __NL__ \
*/ __NL__ \ */ __NL__ \
template<typename T> __NL__ \ template<typename T> __NL__ \
struct PREFIX##_HasMember_##MEMBER_NAME { __NL__ \ struct CAT3(PREFIX, _HasMember_, MEMBER_NAME) { __NL__ \
__NL__ \ __NL__ \
/* This code defines an inner class, Fallback, with one __NL__ \ /* This code defines an inner class, Fallback, with one __NL__ \
* member named MEMBER_NAME (remember that MEMBER_NAME is a __NL__ \ * member named MEMBER_NAME (remember that MEMBER_NAME is a __NL__ \

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save