Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] no invoke<T>?
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2011-04-01 19:35:12


2011/4/1 Noah Roberts <roberts.noah_at_[hidden]>

> How do you intend to use invoke?
> template < typename Sq > // Sq is full of metafunctions
> struct do
> {
> typedef typename fold
> <
> Sq
> , start_state
> , funky<invoke<_2>,_1>
> >::type
> };
>

I would like to empasize here, that I'm no expert -- on the contrary, I'm
trying to learn bases of mpl ;-)

I don't understand your example above. I think 'do' cannot be a name of a
struct, and typedef typename fold<...>::type seems to be missing
something...

Did you mean:
struct do_
{
  typedef typename fold
<
   Sq
 , start_state
 , funky<invoke<_2>,_1>
>::type type;
};

Could you please explain, what funky does, and start_state too? I would like
to see an example I can compile, and if my understanding is correct, make a
simple modification to avoid the need for invoke.

Regards,
Kris



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net