mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-25 18:17:29 +02:00
fixes for msvc related to fusion result_of compatibility
[SVN r37971]
This commit is contained in:
@ -23,10 +23,15 @@ namespace boost { namespace fusion { namespace detail
|
|||||||
{
|
{
|
||||||
struct reserved { };
|
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<
|
template <class Derived, class Function, bool Enable = detail::has_type<
|
||||||
typename remove_reference<Function>::type
|
typename get_result_spec<Function>::type>::value>
|
||||||
::template result<
|
|
||||||
typename remove_const<typename remove_reference<Function>::type>::type(fusion::vector0)> >::value>
|
|
||||||
struct nullary_call_base
|
struct nullary_call_base
|
||||||
{
|
{
|
||||||
template <typename T> inline void operator()(T reserved::*) const { }
|
template <typename T> inline void operator()(T reserved::*) const { }
|
||||||
|
@ -23,10 +23,15 @@ namespace boost { namespace fusion { namespace detail
|
|||||||
{
|
{
|
||||||
struct reserved { };
|
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<
|
template <class Derived, class Function, bool Enable = detail::has_type<
|
||||||
typename remove_reference<Function>::type
|
typename get_result_spec<Function>::type>::value>
|
||||||
::template result<
|
|
||||||
typename remove_const<typename remove_reference<Function>::type>::type(fusion::vector0)> >::value>
|
|
||||||
struct nullary_call_base
|
struct nullary_call_base
|
||||||
{
|
{
|
||||||
template <typename T> inline void operator()(T reserved::*) const { }
|
template <typename T> inline void operator()(T reserved::*) const { }
|
||||||
|
@ -126,8 +126,8 @@ namespace boost {
|
|||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400))
|
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400))
|
||||||
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
|
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
|
||||||
inline typename function::template result<
|
inline typename function::template result<function(
|
||||||
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> >::type
|
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>)>::type
|
||||||
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
|
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
|
||||||
{
|
{
|
||||||
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
|
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
|
||||||
@ -135,8 +135,8 @@ namespace boost {
|
|||||||
return this->fnc_transformed(arg);
|
return this->fnc_transformed(arg);
|
||||||
}
|
}
|
||||||
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
|
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
|
||||||
inline typename function::template result<
|
inline typename function::template result<function(
|
||||||
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> >::type
|
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>)>::type
|
||||||
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
|
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
|
||||||
{
|
{
|
||||||
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
|
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
|
||||||
|
Reference in New Issue
Block a user