walberla::debug Namespace Reference

Namespaces

 check_functions_detail
 
 notstd
 

Classes

struct  op_valid_impl
 The implementation is directly taken from https://stackoverflow.com/a/39348287. More...
 

Typedefs

template<class X , class Y , class Op >
using op_valid = typename op_valid_impl< X, Y, Op >::type
 
template<class X , class Y >
using has_equality = op_valid< X, Y, std::equal_to<> >
 
template<class X , class Y >
using has_inequality = op_valid< X, Y, std::not_equal_to<> >
 
template<class X , class Y >
using has_less_than = op_valid< X, Y, std::less<> >
 
template<class X , class Y >
using has_less_equal = op_valid< X, Y, std::less_equal<> >
 
template<class X , class Y >
using has_greater_than = op_valid< X, Y, std::greater<> >
 
template<class X , class Y >
using has_greater_equal = op_valid< X, Y, std::greater_equal<> >
 
template<class X , class Y >
using has_bit_xor = op_valid< X, Y, std::bit_xor<> >
 
template<class X , class Y >
using has_bit_or = op_valid< X, Y, std::bit_or<> >
 
template<class X , class Y >
using has_left_shift = op_valid< X, Y, notstd::left_shift >
 
template<class X , class Y >
using has_right_shift = op_valid< X, Y, notstd::right_shift >
 

Functions

void myAssert (const char *const file, const int line)
 
std::string demangle (const std::string &name)
 
void printStacktrace ()
 Prints a stack trace to standard error. More...
 
void printStacktrace (std::ostream &os)
 Prints a stack trace to specified output stream. More...
 
void enterTestMode ()
 Enters test mode. More...
 

Typedef Documentation

◆ has_bit_or

template<class X , class Y >
using walberla::debug::has_bit_or = typedef op_valid<X, Y, std::bit_or<> >

◆ has_bit_xor

template<class X , class Y >
using walberla::debug::has_bit_xor = typedef op_valid<X, Y, std::bit_xor<> >

◆ has_equality

template<class X , class Y >
using walberla::debug::has_equality = typedef op_valid<X, Y, std::equal_to<> >

◆ has_greater_equal

template<class X , class Y >
using walberla::debug::has_greater_equal = typedef op_valid<X, Y, std::greater_equal<> >

◆ has_greater_than

template<class X , class Y >
using walberla::debug::has_greater_than = typedef op_valid<X, Y, std::greater<> >

◆ has_inequality

template<class X , class Y >
using walberla::debug::has_inequality = typedef op_valid<X, Y, std::not_equal_to<> >

◆ has_left_shift

template<class X , class Y >
using walberla::debug::has_left_shift = typedef op_valid<X, Y, notstd::left_shift>

◆ has_less_equal

template<class X , class Y >
using walberla::debug::has_less_equal = typedef op_valid<X, Y, std::less_equal<> >

◆ has_less_than

template<class X , class Y >
using walberla::debug::has_less_than = typedef op_valid<X, Y, std::less<> >

◆ has_right_shift

template<class X , class Y >
using walberla::debug::has_right_shift = typedef op_valid<X, Y, notstd::right_shift>

◆ op_valid

template<class X , class Y , class Op >
using walberla::debug::op_valid = typedef typename op_valid_impl<X, Y, Op>::type

Function Documentation

◆ demangle()

std::string walberla::debug::demangle ( const std::string &  name)
inline

◆ enterTestMode()

void walberla::debug::enterTestMode ( )

Enters test mode.

Call this at the beginning of every tests's main() function!

This function may be used to set up error handling for tests. (Or anything else for that matter...)

◆ myAssert()

void walberla::debug::myAssert ( const char *const  file,
const int  line 
)

◆ printStacktrace() [1/2]

void walberla::debug::printStacktrace ( )

Prints a stack trace to standard error.

◆ printStacktrace() [2/2]

void walberla::debug::printStacktrace ( std::ostream &  )

Prints a stack trace to specified output stream.