is_complex.hpp 717 B

12345678910111213141516171819202122
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright 2018 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_MP_IS_COMPLEX_HPP
  6. #define BOOST_MP_IS_COMPLEX_HPP
  7. #include <type_traits>
  8. #include <complex>
  9. namespace boost { namespace multiprecision { namespace detail {
  10. template <class T> struct is_complex : public std::integral_constant<bool, false> {};
  11. template <class T> struct is_complex<std::complex<T> > : public std::integral_constant<bool, true> {};
  12. }
  13. }
  14. } // namespace boost::multiprecision::detail
  15. #endif // BOOST_MP_IS_BACKEND_HPP