// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED #include // size_t #include #include #if !defined(BOOST_HAS_NOTHROW_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL) #include #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #include #include #include #include #include #include #include #endif #endif #if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__) #include #include #include #include #ifdef BOOST_INTEL #include #endif #endif namespace boost { #if !defined(BOOST_HAS_NOTHROW_ASSIGN) && !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) namespace detail { template struct has_nothrow_assign_imp{ static const bool value = false; }; template struct has_nothrow_assign_imp{ static const bool value = noexcept(boost::declval::type>() = boost::declval::type>()); }; template struct has_nothrow_assign_imp{ static const bool value = has_nothrow_assign_imp::value; }; template struct has_nothrow_assign_imp{ static const bool value = has_nothrow_assign_imp::value; }; } #endif template struct has_nothrow_assign : public integral_constant < bool, #ifndef BOOST_HAS_NOTHROW_ASSIGN #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) // Portable C++11 version: detail::has_nothrow_assign_imp::type>::value || is_volatile::type>::value || is_reference::value), is_assignable::type, typename add_reference::type>::value >::value #else ::boost::has_trivial_assign::value #endif #else BOOST_HAS_NOTHROW_ASSIGN(T) #endif > {}; template struct has_nothrow_assign : public has_nothrow_assign {}; template <> struct has_nothrow_assign : public false_type{}; template struct has_nothrow_assign : public false_type{}; template struct has_nothrow_assign : public false_type{}; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template struct has_nothrow_assign : public false_type{}; #endif #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct has_nothrow_assign : public false_type{}; template <> struct has_nothrow_assign : public false_type{}; template <> struct has_nothrow_assign : public false_type{}; #endif } // namespace boost #endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED