aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sol2/examples/include/assert.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2022-11-15 07:35:07 -0500
committerClyne Sullivan <clyne@bitgloo.com>2022-11-15 07:35:07 -0500
commita056c15dd3781b4f6bb89fdd738b14cafc00cd85 (patch)
tree1775a5913c7bc87563b6b4a29c63514cf15b4185 /lib/sol2/examples/include/assert.hpp
parent1405d648b6264cfda7c46f5b251258335abaee83 (diff)
parent57013add5b7c524086272be7d395f9ec5109bde2 (diff)
merge branch lib-cleanup into ui
Diffstat (limited to 'lib/sol2/examples/include/assert.hpp')
-rw-r--r--lib/sol2/examples/include/assert.hpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/sol2/examples/include/assert.hpp b/lib/sol2/examples/include/assert.hpp
deleted file mode 100644
index 4b7df80..0000000
--- a/lib/sol2/examples/include/assert.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef EXAMPLES_ASSERT_HPP
-#define EXAMPLES_ASSERT_HPP
-
-#ifdef SOL2_CI
-struct pre_main {
- pre_main() {
- #ifdef _MSC_VER
- _set_abort_behavior(0, _WRITE_ABORT_MSG);
- #endif
- }
-} pm;
-#endif // Prevent lockup when doing Continuous Integration
-
-#ifndef NDEBUG
-#include <exception>
-#include <iostream>
-#include <cstdlib>
-
-# define m_assert(condition, message) \
- do { \
- if (! (condition)) { \
- std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
- << " line " << __LINE__ << ": " << message << std::endl; \
- std::terminate(); \
- } \
- } while (false)
-
-# define c_assert(condition) \
- do { \
- if (! (condition)) { \
- std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
- << " line " << __LINE__ << std::endl; \
- std::terminate(); \
- } \
- } while (false)
-#else
-# define m_assert(condition, message) do { if (false) { (void)(condition); (void)sizeof(message); } } while (false)
-# define c_assert(condition) do { if (false) { (void)(condition); } } while (false)
-#endif
-
-#endif // EXAMPLES_ASSERT_HPP