Protium
Math and Design Features
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Pages
Assert.h
Go to the documentation of this file.
1
#ifndef Protium_Assert_h_
2
#define Protium_Assert_h_
3
4
#include <stdlib.h>
5
#include <iostream>
6
8
template
<
int
>
9
struct
CompileTimeError
;
10
12
template
<>
13
struct
CompileTimeError
<true> {};
14
16
#define PROTIUM_STATIC_ASSERT(expr, msg) \
17
{ CompileTimeError<((expr) != 0)> ERROR_##msg; (void)ERROR_##msg; }
18
20
#define PROTIUM_RUNTIME_ASSERT(expr, msg)\
21
{if(!expr) std::cerr<<##msg<<std::endl; abort();}
22
23
#endif //Protium_Assert_h_
CompileTimeError
Body-less template.
Definition:
Assert.h:9
Source
kjw_software
Protium
Design
Assert.h
Generated on Thu Oct 9 2014 07:12:43 for Protium by
1.8.6