9#ifndef __c3c605c9e48646758bf03fab65d52836
10#define __c3c605c9e48646758bf03fab65d52836
12#include <boost/assert.hpp>
20 long line,
const std::string& msg);
33#define LF_VERIFY_MSG(expr, msg) \
36 std::stringstream ss; \
38 ::lf::base::AssertionFailed(#expr, __FILE__, __LINE__, ss.str()); \
39 throw std::runtime_error("this code should not be reached"); \
44#define LF_ASSERT_MSG_CONSTEXPR(expr, msg) ((void)0)
45#define LF_ASSERT_MSG(expr, msg) ((void)0)
47#define LF_ASSERT_MSG_CONSTEXPR(expr, msg) \
49 if (!(expr)) throw std::runtime_error(msg); \
52#define LF_ASSERT_MSG(expr, msg) \
55 std::stringstream ss; \
57 ::lf::base::AssertionFailed(#expr, __FILE__, __LINE__, ss.str()); \
58 throw std::runtime_error("this code should not be reached"); \
64#ifdef LF_REDIRECT_ASSERTS
66#ifndef eigen_assert_redirected
70 "WARNING: Eigen has been included before all LehrFEM++ headers but LF_REDIRECT_ASSERTS=On in cmake. Not all Eigen Asserts may print a stacktrace! https://craffael.github.io/lehrfempp/eigen_stacktrace_warning.html")
73 "Eigen has been included before all LehrFEM++ headers but LF_REDIRECT_ASSERTS=On in cmake. Not all Eigen Asserts may print a stacktrace! https://craffael.github.io/lehrfempp/eigen_stacktrace_warning.html"
76#define eigen_assert(x) LF_ASSERT_MSG(x, "")
77#define eigen_assert_redirected
80#define eigen_assert(x) LF_ASSERT_MSG(x, "")
81#define eigen_assert_redirected
Contains basic functionality that is used by other parts of LehrFEM++.
void AssertionFailed(const std::string &expr, const std::string &file, long line, const std::string &msg)