Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:45:15

0001 //  (C) Copyright Matt Borland 2022.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
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 } // Namespaces
0034 
0035 #endif // BOOST_MATH_CCMATH_ISUNORDERED_HPP