Generate an accompaniement for a given melody
|
This file contains useful traits to check some properties of class (namely the implementation of static members and attributes). Some macro to help the user do that are defined here. More...
#include <type_traits>
#include <tuple>
Go to the source code of this file.
Macros | |
#define | CREATE_MEMBER_DETECTOR(X) |
#define | CREATE_STATIC_MEMBER_DETECTOR(X) |
This file contains useful traits to check some properties of class (namely the implementation of static members and attributes). Some macro to help the user do that are defined here.
#define CREATE_MEMBER_DETECTOR | ( | X | ) |
This macro creates a template that allows to check whether the public method X is implemented with a given signature.
For example, if we want to insure that a given class C has a public method foo with signature "bool foo(float,int)", we have to first call the macro "CREATE_MEMBER_DETECTOR(foo)" and then we can use the class in a static assert : "static_assert(has_foo<foo,bool(float,int)>::value,"error")
#define CREATE_STATIC_MEMBER_DETECTOR | ( | X | ) |
This macro creates a template that allows to check whether the class has a static member called X.