Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-12-05 13:27:38

David Abrahams wrote:

>>> template <class T, class U, class V>
>>> struct my_type_generator
>>> {
>>> typedef my_type<T,U,V> type;
>>> };
>>>lambda<my_type_generator> does it
> Oops, I meant
> lambda<my_type_generator<Bound,mpl::_1,mpl::_2> >
> of course!

Ok, that makes more sense now. :)

>>, unless of course your compiler
>>>needs BOOST_MPL_AUX_LAMDA_SUPPORT. I don't think it's much of a
>>>savings, though.
>>Not for one class, no, but when we're talking several classes
>>with several binding requirements, I think there's a significant
>>savings to be had.
> So do you feel you need an additional library feature?

That's what I'm trying to find out. It seems like most of the
stuff is there already in MPL placeholders and binders.

>>Plus your solution here doesn't bind T to a type. :)
> Are you just pointing out my error?

Well...yeah. :) It wasn't meant as an attack. I honestly
was confused about what you presented. Your correction above
makes everything clear to me now.

>>g++ 3.2. The MPL paper and docs don't say anything about
>>using placeholders or binders with classes that aren't
>>metafunctions. How would the binders know what to typedef
>>as apply::type?
> I don't know... well, it could detect whether there was a ::type
> member, and if it were not present, it could just give you the outer
> class. I think that's a bit of a hack, though.

Agreed. Urk...I'm not sure how to get around this problem without
requiring template template parameters (beyond what's used for
placeholders currently).


"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, gregod at, cpdaniel at, john at