mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-21 00:02:42 +02:00
result_of and polymorphic function obj compatibility
[SVN r37962]
This commit is contained in:
@ -37,7 +37,11 @@ template <class Base = boost::blank, class RemoveNullary = mpl::false_>
|
||||
struct test_func
|
||||
: Base
|
||||
{
|
||||
template <class Seq> struct result
|
||||
template<typename Params>
|
||||
struct result;
|
||||
|
||||
template <typename B, typename RN, class Seq>
|
||||
struct result<test_func<B, RN>(Seq)>
|
||||
: mpl::if_< mpl::and_< fusion::result_of::empty<Seq>, RemoveNullary >,
|
||||
boost::blank, mpl::identity<long> >::type
|
||||
{ };
|
||||
@ -60,16 +64,14 @@ struct test_func
|
||||
|
||||
struct fold_op
|
||||
{
|
||||
typedef long result_type;
|
||||
|
||||
template <typename T>
|
||||
long operator()(T & elem, long value) const
|
||||
{
|
||||
elem += sizeof(T);
|
||||
return value + elem;
|
||||
}
|
||||
|
||||
template <typename T0, typename T1> struct result
|
||||
: mpl::identity<long>
|
||||
{ };
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user