This commit is contained in:
2026-03-23 20:54:41 +08:00
commit e13b3650e9
4596 changed files with 1015768 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
// (C) Copyright Matt Borland 2021 - 2023.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// We deliberately use assert in here:
//
// boost-no-inspect
#ifndef BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
#define BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
#include <boost/numeric/odeint/tools/is_standalone.hpp>
#ifndef BOOST_NUMERIC_ODEINT_STANDALONE
#include <boost/assert.hpp>
#define BOOST_NUMERIC_ODEINT_ASSERT(expr) BOOST_ASSERT(expr)
#define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg)
#else // Standalone mode so we use cassert
#include <cassert>
#define BOOST_NUMERIC_ODEINT_ASSERT(expr) assert(expr)
#define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) assert((expr)&&(msg))
#endif
#endif //BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP

View File

@@ -0,0 +1,21 @@
// Copyright Matt Borland 2021.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_NUMERIC_ODEINT_TOOLS_IS_STANDALONE_HPP
#define BOOST_NUMERIC_ODEINT_TOOLS_IS_STANDALONE_HPP
// If one or more of our required dependencies are missing assume we are
// in standalone mode
#ifdef __has_include
#if !__has_include(<boost/config.hpp>) || !__has_include(<boost/assert.hpp>) || !__has_include(<boost/lexical_cast.hpp>) || \
!__has_include(<boost/throw_exception.hpp>) || !__has_include(<boost/predef/other/endian.h>)
# ifndef BOOST_NUMERIC_ODEINT_STANDALONE
# define BOOST_NUMERIC_ODEINT_STANDALONE
# endif
#endif
#endif
#endif //BOOST_NUMERIC_ODEINT_TOOLS_IS_STANDALONE_HPP

View File

@@ -0,0 +1,39 @@
// Copyright Matt Borland 2021 - 2023.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
#define BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
#include <type_traits>
namespace boost {
namespace numeric {
namespace odeint {
namespace detail {
#define BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(trait, name) \
template <typename T> \
class trait \
{ \
private: \
using yes = char; \
struct no { char x[2]; }; \
\
template <typename U> \
static yes test(typename U::name* = nullptr); \
\
template <typename U> \
static no test(...); \
\
public: \
static constexpr bool value = (sizeof(test<T>(0)) == sizeof(char)); \
};
} //namespace detail
} //namespace odeint
} //namespace numeric
} //namespace boost
#endif //BOOST_NUMERIC_ODEINT_TOOLS_TRAITS