diff --git a/include/boost/utility/detail/result_of_iterate.hpp b/include/boost/utility/detail/result_of_iterate.hpp index 98063cd..f619ee7 100644 --- a/include/boost/utility/detail/result_of_iterate.hpp +++ b/include/boost/utility/detail/result_of_iterate.hpp @@ -56,37 +56,37 @@ struct result_of namespace detail { -#ifdef BOOST_NO_SFINAE_EXPR +#ifdef BOOST_RESULT_OF_NO_SFINAE_EXPR template -struct BOOST_PP_CAT(result_of_is_callable_fun_2_, BOOST_PP_ITERATION()); +struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()); template -struct BOOST_PP_CAT(result_of_is_callable_fun_2_, BOOST_PP_ITERATION()) { +struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) { R operator()(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T)) const; typedef result_of_private_type const &(*pfn_t)(...); operator pfn_t() const volatile; }; template -struct BOOST_PP_CAT(result_of_is_callable_fun_, BOOST_PP_ITERATION()); +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()); template -struct BOOST_PP_CAT(result_of_is_callable_fun_, BOOST_PP_ITERATION()) - : BOOST_PP_CAT(result_of_is_callable_fun_2_, BOOST_PP_ITERATION()) +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) + : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template -struct BOOST_PP_CAT(result_of_is_callable_fun_, BOOST_PP_ITERATION()) - : BOOST_PP_CAT(result_of_is_callable_fun_2_, BOOST_PP_ITERATION()) +struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) + : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template struct BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION()) : mpl::eval_if< is_class::type>, - result_of_wrap_callable, - mpl::identity::type> > + result_of_wrap_callable_class, + mpl::identity::type> > > {}; @@ -119,7 +119,7 @@ struct cpp0x_result_of_impl struct cpp0x_result_of_impl struct result_of; @@ -66,7 +70,7 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) template struct tr1_result_of_impl; -#ifdef BOOST_NO_SFINAE_EXPR +#ifdef BOOST_RESULT_OF_NO_SFINAE_EXPR template T result_of_decay(T); @@ -75,13 +79,6 @@ struct result_of_private_type result_of_private_type const &operator,(int) const; }; -template -struct result_of_callable_class : C { - result_of_callable_class(); - typedef result_of_private_type const &(*pfn_t)(...); - operator pfn_t() const volatile; -}; - typedef char result_of_yes_type; // sizeof(result_of_yes_type) == 1 typedef char (&result_of_no_type)[2]; // sizeof(result_of_no_type) == 2 @@ -90,34 +87,41 @@ result_of_no_type result_of_is_private_type(T const &); result_of_yes_type result_of_is_private_type(result_of_private_type const &); -template class Wrapper, typename C> -struct result_of_wrap_callable { - typedef Wrapper type; +template +struct result_of_callable_class : C { + result_of_callable_class(); + typedef result_of_private_type const &(*pfn_t)(...); + operator pfn_t() const volatile; }; -template class Wrapper, typename C> -struct result_of_wrap_callable { - typedef typename result_of_wrap_callable::type &type; +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class type; }; -template class Wrapper, typename C> -struct result_of_wrap_callable { - typedef typename result_of_wrap_callable::type const type; +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class const type; }; -template class Wrapper, typename C> -struct result_of_wrap_callable { - typedef typename result_of_wrap_callable::type volatile type; +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class volatile type; }; -template class Wrapper, typename C> -struct result_of_wrap_callable { - typedef typename result_of_wrap_callable::type const volatile type; +template +struct result_of_wrap_callable_class { + typedef result_of_callable_class const volatile type; +}; + +template +struct result_of_wrap_callable_class { + typedef typename result_of_wrap_callable_class::type &type; }; template struct cpp0x_result_of_impl; -#else // BOOST_NO_SFINAE_EXPR +#else // BOOST_RESULT_OF_NO_SFINAE_EXPR template struct result_of_always_void @@ -127,7 +131,7 @@ struct result_of_always_void template struct cpp0x_result_of_impl {}; -#endif // BOOST_NO_SFINAE_EXPR +#endif // BOOST_RESULT_OF_NO_SFINAE_EXPR template struct result_of_void_impl