Hello,
I had the following transform and function object:
struct bind_functions_transform
: proto::when
<
proto::terminalproto::_,proto::_ >
, bind_method_call(proto::_value, proto::_data, proto::_state)>
struct bind_method_call : proto::callable
{
template <typename T>
struct result
{
typedef typename boost::function_types::parameter_types<T>::type
parameter_types;
typedef typename boost::mpl::next
::type>::type>::type type;
};
template
boost::mpl::size_t
operator()(binding::placeholder::method_valueconst& method
, boost::fusion::vector& data
, boost::mpl::size_t<I> v) const
{
...
}
};
So, I needed one more compile-time information which would be equal to
all calls and transforms,
so I made my transform into a template and also bind_method_call as follows:
template <typename T>
struct bind_functions_transform
: proto::when
<
proto::terminalproto::_,proto::_ >
, bind_method_call<T>(proto::_value, proto::_data, proto::_state)>
template <typename T>
struct bind_method_call : proto::callable [...]
And then I received the following error:
../boost_1_50_0/boost/proto/transform/detail/preprocessed/construct_funop.hpp:24:33:
error: no matching function for call to
‘jvb::binding::bind_method_call::bind_method_call(const
jvb::binding::placeholder::method_value&, boost::fusion::vector&,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_>&, const mpl_::size_t<0ul>&)’
I've remembered the workaround for msvc with proto::call. Because it
seemed that the transform was actually trying to construct instead of
calling bind_method_call, so I changed to:
template <typename PeerClass>
struct bind_functions_transform
: proto::when
<
proto::terminalproto::_,proto::_ >
, proto::call
And it worked. Well, my question is: is this a known limitation? I
didn't find it in proto documentation.
I'm using GCC 4.7.1 and x86_64 with Linux
Regards,
--
Felipe Magno de Almeida