diff --git a/include/boost/ref.hpp b/include/boost/ref.hpp index cd186f9..eae86f8 100644 --- a/include/boost/ref.hpp +++ b/include/boost/ref.hpp @@ -65,7 +65,6 @@ template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST # undef BOOST_REF_CONST -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template class is_reference_wrapper @@ -104,66 +103,6 @@ AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const volatile) # undef AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF -# else // no partial specialization - -} // namespace boost - -#include - -namespace boost -{ - -namespace detail -{ - typedef char (&yes_reference_wrapper_t)[1]; - typedef char (&no_reference_wrapper_t)[2]; - - no_reference_wrapper_t is_reference_wrapper_test(...); - - template - yes_reference_wrapper_t is_reference_wrapper_test(type< reference_wrapper >); - - template - struct reference_unwrapper - { - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct reference_unwrapper - { - template - struct apply - { - typedef typename T::type type; - }; - }; -} - -template -class is_reference_wrapper -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_reference_wrapper_test(type())) - == sizeof(detail::yes_reference_wrapper_t))); - - typedef ::boost::mpl::bool_ type; -}; - -template -class unwrap_reference - : public detail::reference_unwrapper< - is_reference_wrapper::value - >::template apply -{}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template BOOST_FORCEINLINE typename unwrap_reference::type& unwrap_ref(T& t)