From 7ac180ed548c2b7abb8077f35fa8b857f12b8487 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 16 May 2006 22:55:27 +0000 Subject: [PATCH] Use forwarding to get SFINAE effect in some common use cases. Rename detail::result_of to detail::result_of_impl to avoid surprises when result_of is used from within boost::detail. [SVN r33981] --- include/boost/utility/detail/result_of_iterate.hpp | 14 +++++++------- include/boost/utility/result_of.hpp | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/boost/utility/detail/result_of_iterate.hpp b/include/boost/utility/detail/result_of_iterate.hpp index 5aa3a5c..06c4203 100644 --- a/include/boost/utility/detail/result_of_iterate.hpp +++ b/include/boost/utility/detail/result_of_iterate.hpp @@ -21,21 +21,21 @@ template struct result_of - : detail::result_of {}; + : detail::result_of_impl {}; #endif namespace detail { template -struct result_of +struct result_of_impl { typedef R type; }; template -struct result_of +struct result_of_impl { typedef R type; }; @@ -45,7 +45,7 @@ struct result_of #if BOOST_PP_ITERATION() > 1 && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template -struct result_of { @@ -54,7 +54,7 @@ struct result_of -struct result_of @@ -64,7 +64,7 @@ struct result_of -struct result_of @@ -74,7 +74,7 @@ struct result_of -struct result_of diff --git a/include/boost/utility/result_of.hpp b/include/boost/utility/result_of.hpp index 668cb69..4db448e 100644 --- a/include/boost/utility/result_of.hpp +++ b/include/boost/utility/result_of.hpp @@ -39,9 +39,8 @@ struct get_result_of template struct get_result_of -{ - typedef typename F::template result::type type; -}; + : F::template result +{}; template struct get_result_of @@ -50,7 +49,7 @@ struct get_result_of }; template -struct result_of : get_result_of::value)> {}; +struct result_of_impl : get_result_of::value)> {}; } // end namespace detail