IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
Loading...
Searching...
No Matches
MacroDefines.hpp File Reference
#include <cassert>
#include <iostream>

Go to the source code of this file.

Macros

#define Assert(exp)
 Implemented as direct interrupt to avoid dirtying the call stack with assert function when debugging.
 
#define Assume(x)
 
#define STATIC_ASSERT(exp)
 

Macro Definition Documentation

◆ Assert

#define Assert ( exp)
Value:
do { if (!(exp)) { std::cerr << "Assertion failed: " << #exp << " at " << __FILE__ << ":" << __LINE__ << std::endl; assert(exp); } } while (0)

Implemented as direct interrupt to avoid dirtying the call stack with assert function when debugging.

And for optimization, change to Assume() in release builds.

◆ Assume

#define Assume ( x)

◆ STATIC_ASSERT

#define STATIC_ASSERT ( exp)
Value:
UNUSED typedef char static_assertion_[(exp) ? 1 : -1]
#define UNUSED
Definition AttributeDefines.hpp:30