Mirror reflection library 0.5.13
|
Classes | |
struct | mirror::conforms_to< Tested, ConceptTag > |
Checks if the Tested type conforms to a concept. More... | |
Defines | |
#define | MIRROR_ASSERT_CONCEPT(TESTED, CONCEPT_TAG) |
Compile-time concept conformance assertion. |
Concept checking utilities allow to check if a particular type conforms to a concept at compile time. If the tested type does not conform a readable compile time error message is issued. These utilities are meant to be used in unit tests.
#define MIRROR_ASSERT_CONCEPT | ( | TESTED, | |
CONCEPT_TAG | |||
) |
static_assert( \ mirror::conforms_to< \ TESTED, \ mirror::CONCEPT_TAG \ >::value, \ #TESTED " does not conform to " #CONCEPT_TAG \ )
Compile-time concept conformance assertion.
This macro triggers a compile-time error with a readable message if the TESTED type does not conform to a concept specified by the CONCEPT_TAG