Classes | Namespaces | Defines

StaticAssert.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gmtl::CompileTimeError< true >

Namespaces

namespace  gmtl
 

Meta programming classes.


Defines

#define GMTL_STATIC_ASSERT(expr, msg)   { gmtl::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; }
 GMTL_STATIC_ASSERT macro.

Define Documentation

#define GMTL_STATIC_ASSERT (   expr,
  msg 
)    { gmtl::CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; }

GMTL_STATIC_ASSERT macro.

This macro will evaluate a compile time integral or pointer expression; if the expression is zero, the macro will generate a message in the form of an undefined identifier.

Parameters:
expr the expression to evaluate.
msg the message to display if expr is zero; msg cannot contain spaces!

Definition at line 32 of file StaticAssert.h.