
15 Sep
2007
15 Sep
'07
1:22 p.m.
Marco Costalba wrote:
struct make_string {
template<typename T, typename State> struct result { typedef std::string type; };
Seems the docs have not all been updated, yet. This is the old result computation protocol. Today Fusion uses the std::result_of convention. In this case it's sufficient to replace the above code with typedef std::string result_type; For more complex result computation one can still use a nested 'result' metafunction, but it's always unary now and invoked with the signature: template< typename Signature > struct result; template< class Self, typename T0, typename T1 > struct result< Self(T0,T1) > { typedef /*...*/ type; }; Regards, Tobias