OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

StaticAssert.H File Reference

Go to the source code of this file.


Classes

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

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Defines

#define StaticAssertMacro(X, Y)   StaticAssertMacro1(X,Y)
#define StaticAssertMacro1(X, Y)   StaticAssertMacro2(X,Y)
#define StaticAssertMacro2(X, Y)   X##Y
#define StaticAssert(Test)

Detailed Description

Original source file StaticAssert.H

Definition in file StaticAssert.H.


Define Documentation

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

Definition at line 60 of file StaticAssert.H.

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

Definition at line 61 of file StaticAssert.H.

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

Definition at line 62 of file StaticAssert.H.

#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 70 of file StaticAssert.H.

Copyright © 2000-2009 OpenCFD Ltd