update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -7,17 +7,34 @@
// Tools for operator on complex as well as scalar types.
//
#include <boost/type_traits/is_complex.hpp>
#ifndef BOOST_MATH_TOOLS_COMPLEX_HPP
#define BOOST_MATH_TOOLS_COMPLEX_HPP
#include <utility>
#include <boost/math/tools/is_detected.hpp>
namespace boost {
namespace math {
namespace tools {
//
// Speicalize this trait for user-defined complex types (ie Boost.Multiprecision):
//
template <class T>
struct is_complex_type : public boost::is_complex<T> {};
namespace detail {
template <typename T, typename = void>
struct is_complex_type_impl
{
static constexpr bool value = false;
};
template <typename T>
struct is_complex_type_impl<T, void_t<decltype(std::declval<T>().real()),
decltype(std::declval<T>().imag())>>
{
static constexpr bool value = true;
};
} // Namespace detail
template <typename T>
struct is_complex_type : public detail::is_complex_type_impl<T> {};
//
// Use this trait to typecast integer literals to something
// that will interoperate with T:
@@ -55,3 +72,5 @@ namespace boost {
} } }
#endif // BOOST_MATH_TOOLS_COMPLEX_HPP