From 082ae17eafa95f80468d981a0aee2e6693271d18 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sun, 28 Nov 2004 03:35:12 +0000 Subject: [PATCH] merge RC_1_32_0 fixes [SVN r26328] --- include/boost/ref.hpp | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/include/boost/ref.hpp b/include/boost/ref.hpp index 65d5d10..3745e7c 100644 --- a/include/boost/ref.hpp +++ b/include/boost/ref.hpp @@ -73,18 +73,13 @@ template inline reference_wrapper BOOST_REF_CONST cref(T const # undef BOOST_REF_CONST # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + template class is_reference_wrapper : public mpl::false_ { }; -template -class is_reference_wrapper > - : public mpl::true_ -{ -}; - template class unwrap_reference { @@ -92,12 +87,30 @@ class unwrap_reference typedef T type; }; -template -class unwrap_reference > -{ - public: - typedef T type; -}; +# define AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(X) \ +template \ +class is_reference_wrapper< X > \ + : public mpl::true_ \ +{ \ +}; \ +\ +template \ +class unwrap_reference< X > \ +{ \ + public: \ + typedef T type; \ +}; \ +/**/ + +AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper) +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) +AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const) +AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper volatile) +AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const volatile) +#endif + +# undef AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF + # else // no partial specialization } // namespace boost