Scroom  0.14
assertions.hh File Reference
#include <string_view>
#include <sys/cdefs.h>
Include dependency graph for assertions.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Scroom
 
 Scroom::Utils
 
 Scroom::Utils::Detail
 

Macros

#define require(expr)
 
#define ensure(expr)
 
#define verify(expr)
 
#define defect()
 
#define defect_message(m)
 

Functions

void Scroom::Utils::Detail::assertionFailed (std::string_view type, std::string_view expr, std::string_view function, std::string_view filename, unsigned int line) __attribute__((noreturn))
 

Macro Definition Documentation

◆ defect

#define defect ( )
Value:
"control flow assertion", "", static_cast<const char*>(__PRETTY_FUNCTION__), __FILE__, __LINE__)

◆ defect_message

#define defect_message (   m)
Value:
"control flow assertion", (m), static_cast<const char*>(__PRETTY_FUNCTION__), __FILE__, __LINE__)

◆ ensure

#define ensure (   expr)
Value:
((expr) ? ((void)0) \
"postcondition", __STRING(expr), static_cast<const char*>(__PRETTY_FUNCTION__), __FILE__, __LINE__))

◆ require

#define require (   expr)
Value:
((expr) ? ((void)0) \
"precondition", __STRING(expr), static_cast<const char*>(__PRETTY_FUNCTION__), __FILE__, __LINE__))

◆ verify

#define verify (   expr)
Value:
((expr) ? ((void)0) \
"assertion", __STRING(expr), static_cast<const char*>(__PRETTY_FUNCTION__), __FILE__, __LINE__))
Scroom::Utils::Detail::assertionFailed
void assertionFailed(std::string_view type, std::string_view expr, std::string_view function, std::string_view filename, unsigned int line) __attribute__((noreturn))
Definition: assertions.cc:50