summaryrefslogtreecommitdiff
path: root/boost/type_traits/has_new_operator.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/has_new_operator.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/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