35 #ifndef StaticAssert_H 36 #define StaticAssert_H 56 template<
unsigned Test>
68 #define StaticAssertMacro(X,Y) StaticAssertMacro1(X,Y) 69 #define StaticAssertMacro1(X,Y) StaticAssertMacro2(X,Y) 70 #define StaticAssertMacro2(X,Y) X##Y 78 #define StaticAssert(Test) \ 79 typedef ::Foam::StaticAssertionTest \ 81 sizeof( ::Foam::StaticAssertionFailed< ((Test) ? true : false) > ) \ 82 > StaticAssertMacro(StaticAssertionTest, __LINE__)
Forward declaration of StaticAssertionFailed.
Helper class for handling static assertions.