[fusion] trouble with transform

Hi,
I have code similar to the following snippet:
#include

Try this
struct make_b {
template<typename Sig> struct result;
template <typename DS>
struct result

Hi,
I have code similar to the following snippet:
#include
#include #include #include namespace fusion=boost::fusion; template<typename T> class A { public: struct B {};
B make_b() const { return B(); } };
template<typename T> A<T> make_a( T const& ) { return A<T>(); }
struct make_b { template<typename Sig> struct result;
template <typename DS> struct result
{ typedef typename DS::B type; }; template <typename T> typename T::B operator()(T const& t) const { return t.make_b(); } };
int main() { namespace fusion=boost::fusion;
fusion::as_list( fusion::transform( fusion::make_list( make_a( 1. ), make_a( 1 ) ), make_b() ) );
return 0; }
it fails to compile with an error like this:
... rather long context here ..\..\../boost/utility/result_of.hpp:83:1: error: invalid use of incomplete type ‘struct make_b::result
’ test.cpp:27:35: error: declaration of ‘struct make_b::result ’ What am I doing wrong?
You need to add a specialization result_of
participants (3)
-
Gennadiy Rozental
-
Michel Morin
-
Nathan Ridge