From d9ec475d945d3035377a0d89ed42e382d8988891 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 6 Oct 2016 10:33:54 +0900 Subject: Imported Upstream version 1.60.0 Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak --- boost/type_traits/has_nothrow_copy.hpp | 75 +++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 23 deletions(-) (limited to 'boost/type_traits/has_nothrow_copy.hpp') diff --git a/boost/type_traits/has_nothrow_copy.hpp b/boost/type_traits/has_nothrow_copy.hpp index 9c3c9030a4..0d9bb18379 100644 --- a/boost/type_traits/has_nothrow_copy.hpp +++ b/boost/type_traits/has_nothrow_copy.hpp @@ -9,45 +9,74 @@ #ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED #define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED -#include +#include +#include + +#ifdef BOOST_HAS_NOTHROW_COPY -// should be the last #include -#include +#if defined(BOOST_CLANG) || defined(__GNUC__) || defined(__ghs__) || defined(__CODEGEARC__) || defined(__SUNPRO_CC) +#include +#include +#include +#include +#ifdef BOOST_INTEL +#include +#endif +#elif defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#ifdef BOOST_INTEL +#include +#include +#endif +#endif namespace boost { +template struct has_nothrow_copy_constructor : public integral_constant{}; + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) + +#include +#include + +namespace boost{ + namespace detail{ +template +struct has_nothrow_copy_constructor_imp : public boost::integral_constant{}; template -struct has_nothrow_copy_imp{ -#ifdef BOOST_HAS_NOTHROW_COPY - BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_COPY(T)); -#else - BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_copy::value); -#endif -}; +struct has_nothrow_copy_constructor_imp : public boost::integral_constant()))>{}; } -BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp::value) -BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp::value) +template struct has_nothrow_copy_constructor : public detail::has_nothrow_copy_constructor_imp::value>{}; + +#else + +#include + +namespace boost{ + +template struct has_nothrow_copy_constructor : public integral_constant::value>{}; -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void volatile,false) #endif -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void,false) +template <> struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_nothrow_copy_constructor : public false_type{}; +#endif #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void volatile,false) +template <> struct has_nothrow_copy_constructor : public false_type{}; +template <> struct has_nothrow_copy_constructor : public false_type{}; +template <> struct has_nothrow_copy_constructor : public false_type{}; #endif -} // namespace boost +template struct has_nothrow_copy : public has_nothrow_copy_constructor{}; -#include +} // namespace boost #endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED -- cgit v1.2.3