From 190b0bf58bd8616936244bf964f40c3a03ed7201 Mon Sep 17 00:00:00 2001 From: Eric Friedman Date: Mon, 1 Sep 2003 07:51:13 +0000 Subject: [PATCH] Added type_traits specializations. [SVN r19894] --- include/boost/detail/reference_content.hpp | 32 +++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/reference_content.hpp b/include/boost/detail/reference_content.hpp index 49456ae..f073aea 100644 --- a/include/boost/detail/reference_content.hpp +++ b/include/boost/detail/reference_content.hpp @@ -19,7 +19,11 @@ #include "boost/config.hpp" -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include "boost/mpl/bool.hpp" +# include "boost/type_traits/has_nothrow_constructor.hpp" +# include "boost/type_traits/has_nothrow_copy.hpp" +#else # include "boost/utility/addressof.hpp" # include "boost/type.hpp" # include "boost/mpl/if.hpp" @@ -29,6 +33,7 @@ #include "boost/mpl/void.hpp" namespace boost { + namespace detail { /////////////////////////////////////////////////////////////////////////////// @@ -175,6 +180,31 @@ struct make_reference_content< mpl::void_ > }; } // namespace detail + +/////////////////////////////////////////////////////////////////////////////// +// reference_content type traits specializations +// + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template +struct has_nothrow_constructor< + ::boost::detail::reference_content< T& > + > + : mpl::true_ +{ +}; + +template +struct has_nothrow_copy< + ::boost::detail::reference_content< T& > + > + : mpl::true_ +{ +}; + +#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + } // namespace boost #endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP