File indexing completed on 2025-04-27 08:50:10
0001
0002
0003
0004
0005
0006 #ifndef BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
0007 #define BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
0008
0009 #include <type_traits>
0010
0011 namespace boost {
0012 namespace numeric {
0013 namespace odeint {
0014 namespace detail {
0015
0016 #define BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(trait, name) \
0017 template <typename T> \
0018 class trait \
0019 { \
0020 private: \
0021 using yes = char; \
0022 struct no { char x[2]; }; \
0023 \
0024 template <typename U> \
0025 static yes test(typename U::name* = nullptr); \
0026 \
0027 template <typename U> \
0028 static no test(...); \
0029 \
0030 public: \
0031 static constexpr bool value = (sizeof(test<T>(0)) == sizeof(char)); \
0032 };
0033
0034 }
0035 }
0036 }
0037 }
0038
0039 #endif