summaryrefslogtreecommitdiff
path: root/boost/type_traits/is_complex.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_traits/is_complex.hpp')
-rw-r--r--boost/type_traits/is_complex.hpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/boost/type_traits/is_complex.hpp b/boost/type_traits/is_complex.hpp
index 0813dac903..7cf04b4796 100644
--- a/boost/type_traits/is_complex.hpp
+++ b/boost/type_traits/is_complex.hpp
@@ -8,27 +8,17 @@
#ifndef BOOST_TT_IS_COMPLEX_HPP
#define BOOST_TT_IS_COMPLEX_HPP
-#include <boost/type_traits/is_convertible.hpp>
#include <complex>
-// should be the last #include
-#include <boost/type_traits/detail/bool_trait_def.hpp>
-
+#include <boost/type_traits/integral_constant.hpp>
namespace boost {
-namespace detail{
-
-struct is_convertible_from_tester
-{
- template <class T>
- is_convertible_from_tester(const std::complex<T>&);
-};
-}
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_complex,T,(::boost::is_convertible<T, boost::detail::is_convertible_from_tester>::value))
+ template <class T> struct is_complex : public false_type {};
+ template <class T> struct is_complex<const T > : public is_complex<T>{};
+ template <class T> struct is_complex<volatile const T > : public is_complex<T>{};
+ template <class T> struct is_complex<volatile T > : public is_complex<T>{};
+ template <class T> struct is_complex<std::complex<T> > : public true_type{};
} // namespace boost
-#include <boost/type_traits/detail/bool_trait_undef.hpp>
-
#endif //BOOST_TT_IS_COMPLEX_HPP