SUNphi
1.0
|
#include <BinarySmET.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::ref2 > *) |
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) ref2
Internal implementation
Definition at line 21 of file BinarySmET.hpp.
using SUNphi::HasMember_ref2< Type >::No = char[2] |
Internal class of size 2 used if Type has not the method
Definition at line 21 of file BinarySmET.hpp.
using SUNphi::HasMember_ref2< Type >::Yes = char[1] |
Internal class of size 1, used if Type has the method
Definition at line 21 of file BinarySmET.hpp.
|
static |
Forward definition of test function, taking a pointer to the
type of ref2 as argument, returning No. The instantiation
will fail if Base have two member ref2 implemented, which
means that Type has the member
|
static |
Forward definition of test function, taking a pointer to the
type of ref2 as argument, returning Yes. The instantiation
will work when the other fails, which means that Type does
have the member
|
static |
Result of the check, comparing the size of return type of
test with the size of yes
Definition at line 21 of file BinarySmET.hpp.