SUNphi
1.0
|
#include <Base.hpp>
Classes | |
struct | Check |
struct | Derived |
struct | Fallback |
Public Types | |
using | Yes = char[1] |
using | No = char[2] |
Static Public Member Functions | |
template<typename U > | |
static No & | test (Check< int Fallback::*,&U::serializableMembers > *) |
template<typename U > | |
static Yes & | test (...) |
Static Public Attributes | |
static constexpr bool | result = sizeof(test<Derived>(nullptr))==sizeof(Yes) |
Detect if Type
has member (variable or method) serializableMembers
Internal implementation
using SUNphi::HasMember_serializableMembers< Type >::No = char[2] |
using SUNphi::HasMember_serializableMembers< Type >::Yes = char[1] |
|
static |
Forward definition of test function, taking a pointer to the
type of serializableMembers as argument, returning No. The instantiation
will fail if Base have two member serializableMembers implemented, which
means that Type has the member
|
static |
Forward definition of test function, taking a pointer to the
type of serializableMembers as argument, returning Yes. The instantiation
will work when the other fails, which means that Type does
have the member
|
static |