Unravel Engine C++ Reference
Loading...
Searching...
No Matches
assert.hpp File Reference
#include <exception>
#include <stdexcept>

Go to the source code of this file.

Macros

#define CONTRACTS_H
 
#define THROW_ON_CONTRACT_VIOLATION
 
#define STRINGIFY_DETAIL(x)
 
#define STRINGIFY(x)
 
#define expects(cond)
 
#define ensures(cond)
 

Macro Definition Documentation

◆ CONTRACTS_H

#define CONTRACTS_H

Definition at line 4 of file assert.hpp.

◆ ensures

#define ensures ( cond)
Value:
if(!(cond)) \
throw std::runtime_error("Postcondition failure at " __FILE__ ": " STRINGIFY(__LINE__))
#define STRINGIFY(x)
Definition assert.hpp:25

Definition at line 32 of file assert.hpp.

◆ expects

#define expects ( cond)
Value:
if(!(cond)) \
throw std::runtime_error("Precondition failure at " __FILE__ ": " STRINGIFY(__LINE__))

Definition at line 29 of file assert.hpp.

◆ STRINGIFY

#define STRINGIFY ( x)
Value:
#define STRINGIFY_DETAIL(x)
Definition assert.hpp:24
float x

Definition at line 25 of file assert.hpp.

◆ STRINGIFY_DETAIL

#define STRINGIFY_DETAIL ( x)
Value:
#x

Definition at line 24 of file assert.hpp.

◆ THROW_ON_CONTRACT_VIOLATION

#define THROW_ON_CONTRACT_VIOLATION

Definition at line 17 of file assert.hpp.