From 52ef1b9bacc5cfc84d7166dfe35381eba5a0b152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Fri, 19 Apr 2002 19:42:05 +0000 Subject: [PATCH] some changes in the return_type_2 traits [SVN r13532] --- test/extending_return_type_traits.cpp | 8 ++++---- test/member_pointer_test.cpp | 13 ++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/extending_return_type_traits.cpp b/test/extending_return_type_traits.cpp index f892a23..21dc0d1 100644 --- a/test/extending_return_type_traits.cpp +++ b/test/extending_return_type_traits.cpp @@ -188,19 +188,19 @@ struct plain_return_type_2, X, Y> { // if you want to make a distinction between differently cv-qualified // types, you need to specialize on a different level: template<> -struct return_type_2, XX&, YY&> { +struct return_type_2, XX, YY> { typedef YY type; }; template<> -struct return_type_2, const XX&, const YY&> { +struct return_type_2, const XX, const YY> { typedef ZZ type; }; template<> -struct return_type_2, volatile XX&, volatile YY&> { +struct return_type_2, volatile XX, volatile YY> { typedef XX type; }; template<> -struct return_type_2, volatile const XX&, const volatile YY&> { +struct return_type_2, volatile const XX, const volatile YY> { typedef VV type; }; diff --git a/test/member_pointer_test.cpp b/test/member_pointer_test.cpp index cf53f61..994637d 100644 --- a/test/member_pointer_test.cpp +++ b/test/member_pointer_test.cpp @@ -117,30 +117,33 @@ bool operator->*(B b, A a) { // let's provide specializations to take care of the return type deduction. // Note, that you need to provide all four cases for non-const and const -// references :( +// or use the plain_return_type_2 template. namespace boost { namespace lambda { template <> -struct return_type_2, B&, A&> { +struct return_type_2, B, A> { typedef bool type; }; template<> -struct return_type_2, const B&, A&> { +struct return_type_2, const B, A> { typedef bool type; }; template<> -struct return_type_2, B&, const A&> { +struct return_type_2, B, const A> { typedef bool type; }; template<> -struct return_type_2, const B&, const A&> { +struct return_type_2, const B, const A> { typedef bool type; }; + + + } // lambda } // boost