HyperHDG
|
This file provides the function tpp_assert
.
More...
#include <iostream>
Go to the source code of this file.
Namespaces | |
TPP | |
Contains the functionalities to evaluate and integrate tensor product type polynomials. | |
Macros | |
#define | tpp_assert(Expr, Msg) __TPP_Assert(#Expr, Expr, __FILE__, __LINE__, Msg) |
The assertion to be used within tpp — deactivate using -DNDEBUG compile flag. More... | |
This file provides the function tpp_assert
.
This is a wrapper file to provide a function that allows to use assertions that are similar to those provided by cassert. That is, we define a macro tpp_assert
that implements assert. If a user wants to use assertions, it is recommended to use tpp_assert
(Expr
, Msg
). The use of the function __TPP_Assert
is not recommended.
Whether this functionality is active or not can be deduced via setting NDEBUG
, when the code is compiled. Using this functionality makes your program significantly slower. However, usage is highly recommended for testing.
#define tpp_assert | ( | Expr, | |
Msg | |||
) | __TPP_Assert(#Expr, Expr, __FILE__, __LINE__, Msg) |
The assertion to be used within tpp — deactivate using -DNDEBUG compile flag.
Expr | C++ Expression that can be evaluated to true or false . |
Msg | Message that is to be displayed if Expr is evaluated to false . |