Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
Teuchos_StaticSetupMacro.hpp File Reference
#include "Teuchos_ConfigDefs.hpp"
Include dependency graph for Teuchos_StaticSetupMacro.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEUCHOS_STATIC_SETUP()
 Run setup code statically in a translation unit. More...
 

Macro Definition Documentation

#define TEUCHOS_STATIC_SETUP ( )
Value:
class StaticSetup { \
public: \
StaticSetup(); \
} staticSetup; \
\
StaticSetup::StaticSetup()

Run setup code statically in a translation unit.

NOTE: Make sure the call this in an anonymous namespace as:

namespace {

TEUCHOS_STATIC_SETUP()
{
  // Some code you want to call before main() runs ...
  ...
}

} // namespace

Definition at line 68 of file Teuchos_StaticSetupMacro.hpp.