Protium
Math and Design Features
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Assert.h File Reference
#include <stdlib.h>
#include <iostream>
Include dependency graph for Assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CompileTimeError< int >
 Body-less template. More...
 
struct  CompileTimeError< true >
 Fully-defined template. More...
 

Macros

#define PROTIUM_RUNTIME_ASSERT(expr, msg)   {if(!expr) std::cerr<<##msg<<std::endl; abort();}
 Use for runtime assertions. More...
 
#define PROTIUM_STATIC_ASSERT(expr, msg)   { CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; }
 Use for performing static assertion. More...
 

Macro Definition Documentation

#define PROTIUM_RUNTIME_ASSERT (   expr,
  msg 
)    {if(!expr) std::cerr<<##msg<<std::endl; abort();}

Use for runtime assertions.

Definition at line 20 of file Assert.h.

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

Use for performing static assertion.

Definition at line 16 of file Assert.h.