Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-12-07 10:26:16


Aleksey Gurtovoy wrote:

> That's because the MPL's lambda works only with metafunctions which template
> parameters are _types_, and only types:

That's what I suspected.

> 3) a metafunction with template template parameter, can't be used in lambda
> expressions:

Again, what I suspected.

> It _is_ possible to implement a single template along the lines of the
> SHAZAM template you've mentioned early in the thread:
>
> template<typename T, typename U, typename V>
> struct my_type { ... } // Note: no ::type member
>
> typedef SHAZAM<my_type<int, _1, _2> > generator;
>
> typedef generator::template apply<char, float>::type my_type_inst;
>
> but not at the user side - the library internal mechanisms needs to be made
> aware of it. I considered this before, - as well as the option of directly
> supporting the "reduced" metafunction form, - and the latter is currently my
> preference. Will see if something changes after I actually implement it (for
> one, it might slow down the lambda significantly, - but we'll see).

Thanks for considering this. I think it will be quite useful. I look
forward to seeing what you come up with!

                             -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk