|
MorphoGraphX
|
Define the STATIC_ASSERT macro. More...
Go to the source code of this file.
Classes | |
| struct | mgx::util::STATIC_ASSERTION_FAILURE< x > |
| struct | mgx::util::STATIC_ASSERTION_FAILURE< true > |
| struct | mgx::util::static_assert_test< x > |
Namespaces | |
| mgx | |
| This namespace contains all the API of MorphoGraphX. | |
Macros | |
| #define | _MGX_JOIN(X, Y) |
| #define | _MGX_DO_JOIN(X, Y) |
| #define | _MGX_DO_JOIN2(X, Y) |
| #define | STATIC_ASSERT(B) |
| Assertion that works at compile time. More... | |
Define the STATIC_ASSERT macro.
| #define STATIC_ASSERT | ( | B | ) |
Assertion that works at compile time.
If the parameters evaluate to false, the program won't compile. Useful to check that a template method is not used when it is invalid.
A typical example can be found in the implementation of the util::Vector class to make sure the constructor with n (fixed) values are used only if the vector is of dimension n:
1.8.11