summaryrefslogtreecommitdiff
path: root/boost/type_traits/has_new_operator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_traits/has_new_operator.hpp')
-rw-r--r--boost/type_traits/has_new_operator.hpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/boost/type_traits/has_new_operator.hpp b/boost/type_traits/has_new_operator.hpp
index c615127da3..4def872ddf 100644
--- a/boost/type_traits/has_new_operator.hpp
+++ b/boost/type_traits/has_new_operator.hpp
@@ -11,12 +11,9 @@
#include <new> // std::nothrow_t
#include <cstddef> // std::size_t
-#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/detail/ice_or.hpp>
-
-// should be the last #include
-#include <boost/type_traits/detail/bool_trait_def.hpp>
+#include <boost/detail/workaround.hpp>
#if defined(new)
# if BOOST_WORKAROUND(BOOST_MSVC, >= 1310)
@@ -129,19 +126,17 @@ namespace detail {
#endif
#endif
BOOST_STATIC_CONSTANT(bool, value =
- (::boost::type_traits::ice_or<
- (s1 == sizeof(type_traits::yes_type)),
- (s2 == sizeof(type_traits::yes_type)),
- (s3 == sizeof(type_traits::yes_type)),
- (s4 == sizeof(type_traits::yes_type)),
- (s5 == sizeof(type_traits::yes_type)),
+ (s1 == sizeof(type_traits::yes_type)) ||
+ (s2 == sizeof(type_traits::yes_type)) ||
+ (s3 == sizeof(type_traits::yes_type)) ||
+ (s4 == sizeof(type_traits::yes_type)) ||
+ (s5 == sizeof(type_traits::yes_type)) ||
(s6 == sizeof(type_traits::yes_type))
- >::value)
);
};
} // namespace detail
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_new_operator,T,::boost::detail::has_new_operator_impl<T>::value)
+template <class T> struct has_new_operator : public integral_constant<bool, ::boost::detail::has_new_operator_impl<T>::value>{};
} // namespace boost
@@ -149,6 +144,4 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_new_operator,T,::boost::detail::has_new_operato
# pragma pop_macro("new")
#endif
-#include <boost/type_traits/detail/bool_trait_undef.hpp>
-
#endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED