assert.hpp 909 B

123456789101112131415161718192021222324252627282930
  1. // (C) Copyright Matt Borland 2021 - 2023.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // We deliberately use assert in here:
  7. //
  8. // boost-no-inspect
  9. #ifndef BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
  10. #define BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
  11. #include <boost/numeric/odeint/tools/is_standalone.hpp>
  12. #ifndef BOOST_NUMERIC_ODEINT_STANDALONE
  13. #include <boost/assert.hpp>
  14. #define BOOST_NUMERIC_ODEINT_ASSERT(expr) BOOST_ASSERT(expr)
  15. #define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg)
  16. #else // Standalone mode so we use cassert
  17. #include <cassert>
  18. #define BOOST_NUMERIC_ODEINT_ASSERT(expr) assert(expr)
  19. #define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) assert((expr)&&(msg))
  20. #endif
  21. #endif //BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP