summaryrefslogtreecommitdiff
path: root/boost/type_traits/is_complex.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:33:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:36:09 +0900
commitd9ec475d945d3035377a0d89ed42e382d8988891 (patch)
tree34aff2cee4b209906243ab5499d61f3edee2982f /boost/type_traits/is_complex.hpp
parent71d216b90256936a9638f325af9bc69d720e75de (diff)
downloadboost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz
boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2
boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
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