fixes for msvc related to fusion result_of compatibility

[SVN r37971]
This commit is contained in:
Dan Marsden
2007-06-11 21:09:44 +00:00
parent 0fcbc5b467
commit a2046a5aa6
3 changed files with 20 additions and 10 deletions

View File

@ -23,10 +23,15 @@ namespace boost { namespace fusion { namespace detail
{
struct reserved { };
template<typename Function>
struct get_result_spec
{
typedef typename remove_const<typename remove_reference<Function>::type>::type function;
typedef typename function::template result<function(fusion::vector0)> type;
};
template <class Derived, class Function, bool Enable = detail::has_type<
typename remove_reference<Function>::type
::template result<
typename remove_const<typename remove_reference<Function>::type>::type(fusion::vector0)> >::value>
typename get_result_spec<Function>::type>::value>
struct nullary_call_base
{
template <typename T> inline void operator()(T reserved::*) const { }

View File

@ -23,10 +23,15 @@ namespace boost { namespace fusion { namespace detail
{
struct reserved { };
template<typename Function>
struct get_result_spec
{
typedef typename remove_const<typename remove_reference<Function>::type>::type function;
typedef typename function::template result<function(fusion::vector0)> type;
};
template <class Derived, class Function, bool Enable = detail::has_type<
typename remove_reference<Function>::type
::template result<
typename remove_const<typename remove_reference<Function>::type>::type(fusion::vector0)> >::value>
typename get_result_spec<Function>::type>::value>
struct nullary_call_base
{
template <typename T> inline void operator()(T reserved::*) const { }

View File

@ -126,8 +126,8 @@ namespace boost {
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400))
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename function::template result<
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> >::type
inline typename function::template result<function(
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>)>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
{
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
@ -135,8 +135,8 @@ namespace boost {
return this->fnc_transformed(arg);
}
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename function::template result<
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> >::type
inline typename function::template result<function(
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>)>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
{
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>