Boost logo

Proto :

Subject: Re: [proto] invalid use of incomplete type 'detail::uncvref<...>'
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2011-02-28 15:15:56


Hi Eric,

> 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;

Thanks. I added another specialisation for mpl::integral_c<int, n> > and it worked. But, now I'm wondering why on earth was that basically needed? I had never touched mpl::integral_c in my code snippet. That should have been generated by Proto then, right? And, in that case, may I please know why?

On the other hand, I'm wondering why GCC never nagged about the need for mpl::integral_c<int, 1> when I wrote:

EW1<InpPool, GameState, AmmoMsg>() >> Plus1();

In other words, why is mpl::int_<n> used for the above line (when n == 1), whereas mpl::integral_c<int, n> is used for the following one (when n == 2)?

(EW1<InpPool, GameState, AmmoMsg>() || EW1<InpPool, GameState, AmmoMsg>()) >> Plus2();

TIA,
--Hossein


Proto list run by eric at boostpro.com