preCICE v3.1.2
|
#include <cstdlib>
#include <iostream>
#include <string_view>
#include "utils/fmt.hpp"
#include <boost/current_function.hpp>
#include <boost/preprocessor/comparison/greater.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/preprocessor/variadic/size.hpp>
#include "utils/ArgumentFormatter.hpp"
#include "utils/Parallel.hpp"
#include "utils/stacktrace.hpp"
#include <cassert>
Go to the source code of this file.
Namespaces | |
namespace | precice |
Main namespace of the precice library. | |
namespace | precice::utils |
contains precice-related utilities. | |
Macros | |
#define | PRECICE_ASSERT_WRAPPER() assert(false) |
#define | PRECICE_ASSERT_IMPL(check, args) |
#define | PRECICE_ASSERT_IMPL_N(check, ...) PRECICE_ASSERT_IMPL(check, PRECICE_LOG_ARGUMENTS(__VA_ARGS__)) |
#define | PRECICE_ASSERT_IMPL_1(check) PRECICE_ASSERT_IMPL(check, "none") |
#define | PRECICE_ASSERT(...) |
#define | PRECICE_UNREACHABLE(...) |
Variables | |
static constexpr std::string_view | precice::utils::ASSERT_FMT |
#define PRECICE_ASSERT | ( | ... | ) |
Asserts either a single statement or a statement followed by multiple arguments.
This dispatches to PRECICE_ASSERT_IMPL_1 if only a check is provided, otherwise to PRECICE_ASSERT_IMPL_N
Definition at line 87 of file assertion.hpp.
#define PRECICE_ASSERT_IMPL | ( | check, | |
args ) |
Main implementation of the assertion
[in] | check | the expression which needs to evaluate to true for the assertion to pass |
[in] | args | the expression which evaluates to the formatted arguments |
Definition at line 61 of file assertion.hpp.
#define PRECICE_ASSERT_IMPL_1 | ( | check | ) | PRECICE_ASSERT_IMPL(check, "none") |
Definition at line 80 of file assertion.hpp.
#define PRECICE_ASSERT_IMPL_N | ( | check, | |
... ) PRECICE_ASSERT_IMPL(check, PRECICE_LOG_ARGUMENTS(__VA_ARGS__)) |
Definition at line 77 of file assertion.hpp.
#define PRECICE_ASSERT_WRAPPER | ( | ) | assert(false) |
Definition at line 52 of file assertion.hpp.
#define PRECICE_UNREACHABLE | ( | ... | ) |
Displays an error message and aborts the program independent of the build type. Use to mark unreachable statements under switch or if blocks.
Definition at line 95 of file assertion.hpp.