Data Structures | Namespaces | Macros
StaticAssert.H File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  StaticAssertionFailed
 Forward declaration of StaticAssertionFailed. More...
 
class  StaticAssertionFailed< true >
 Specialization for successful assertions. More...
 
class  StaticAssertionTest< Test >
 Helper class for handling static assertions. More...
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define StaticAssertMacro(X, Y)   StaticAssertMacro1(X,Y)
 
#define StaticAssertMacro1(X, Y)   StaticAssertMacro2(X,Y)
 
#define StaticAssertMacro2(X, Y)   X##Y
 
#define StaticAssert(Test)
 Assert that some test is true at compile-time. More...
 

Detailed Description

Original source file StaticAssert.H

Definition in file StaticAssert.H.

Macro Definition Documentation

◆ StaticAssertMacro

#define StaticAssertMacro (   X,
  Y 
)    StaticAssertMacro1(X,Y)

Definition at line 68 of file StaticAssert.H.

◆ StaticAssertMacro1

#define StaticAssertMacro1 (   X,
  Y 
)    StaticAssertMacro2(X,Y)

Definition at line 69 of file StaticAssert.H.

◆ StaticAssertMacro2

#define StaticAssertMacro2 (   X,
  Y 
)    X##Y

Definition at line 70 of file StaticAssert.H.

◆ StaticAssert

#define StaticAssert (   Test)
Value:
typedef ::Foam::StaticAssertionTest \
< \
sizeof( ::Foam::StaticAssertionFailed< ((Test) ? true : false) > ) \
> StaticAssertMacro(StaticAssertionTest, __LINE__)

Assert that some test is true at compile-time.

Definition at line 76 of file StaticAssert.H.

StaticAssertMacro
#define StaticAssertMacro(X, Y)
Definition: StaticAssert.H:68
Foam::StaticAssertionFailed
Forward declaration of StaticAssertionFailed.
Definition: StaticAssert.H:42