On 2/22/2011 1:45 AM, Hossein Haeri wrote:
> EW1<InpPool, GameState, AmmoMsg>() >> &plus1;
> EW1<InpPool, GameState, AmmoMsg>() >> Plus1();
> (EW1<InpPool, GameState, AmmoMsg>() || EW1<InpPool, GameState, AmmoMsg>()) >> 
> Plus2();//***
> (EW1<InpPool, GameState, AmmoMsg>() || EW1<InpPool, GameState, AmmoMsg>()) >> 
> &plus2;
> When I compile the *** line, I get a giant spew attached in a file called 
> Err.txt. For those kind fellows on the list who'd like to see the actual code 
> as well, a *very small* zip file is attached to this posting. (The zip file 
> contains 2 .cpp's as well 5 .hpp's which simply need to be built altogether 
> in a single directory.)
> Anyone having any ideas please?

You need to look more closely at the error messages you get. The actual
error is:

boost/proto/matches.hpp:391:13: error: invalid use of incomplete type
'struct boost::proto::detail::uncvref<arity_caller::CanBeCalled<Plus2,
mpl_::integral_c<int, 2> > >::type'

Now look at how you've defined CanBeCalled:

  template<typename Fun, typename Int>
  struct CanBeCalled;

#define CAN_BE_CALLED(z, n, unused)\
  template<typename Fun, typename Int>\
  struct CanBeCalledImpl<Fun, boost::mpl::int_<n> > ...

Can you see the problem yet? Hint: mpl::int_ != mpl::integral_c.

Eric Niebler
BoostPro Computing
proto mailing list

Reply via email to