File indexing completed on 2025-01-30 09:45:15
0001
0002
0003
0004
0005
0006 #ifndef BOOST_MATH_CCMATH_ISUNORDERED_HPP
0007 #define BOOST_MATH_CCMATH_ISUNORDERED_HPP
0008
0009 #include <boost/math/ccmath/detail/config.hpp>
0010
0011 #ifdef BOOST_MATH_NO_CCMATH
0012 #error "The header <boost/math/isunordered.hpp> can only be used in C++17 and later."
0013 #endif
0014
0015 #include <boost/math/ccmath/isnan.hpp>
0016
0017 namespace boost::math::ccmath {
0018
0019 template <typename T>
0020 inline constexpr bool isunordered(const T x, const T y) noexcept
0021 {
0022 if(BOOST_MATH_IS_CONSTANT_EVALUATED(x))
0023 {
0024 return boost::math::ccmath::isnan(x) || boost::math::ccmath::isnan(y);
0025 }
0026 else
0027 {
0028 using std::isunordered;
0029 return isunordered(x, y);
0030 }
0031 }
0032
0033 }
0034
0035 #endif