David Abrahams wrote:
> Aleksey Gurtovoy <[EMAIL PROTECTED]> writes:
> > Okay, from this moment MPL's lambda supports "reduced"
> > metafunction form directly (if detected):
> >
> > template< typename T > struct her
> > {
> > // no 'type' member!
> > };
> >
> > typedef lamb
Aleksey Gurtovoy <[EMAIL PROTECTED]> writes:
> Aleksey Gurtovoy wrote:
>> David A. Greene wrote:
>> > Thanks for considering this. I think it will be quite
>> > useful. I look forward to seeing what you come up with!
>>
>> Well, it turned out to be a little bit more complicated than
>> I had
Aleksey Gurtovoy wrote:
> David A. Greene wrote:
> > Thanks for considering this. I think it will be quite
> > useful. I look forward to seeing what you come up with!
>
> Well, it turned out to be a little bit more complicated than
> I had foreseen, so it's not there yet. Please stay tuned!
O
David A. Greene wrote:
> Aleksey Gurtovoy wrote:
> > It _is_ possible to implement a single template along the
> > lines of the SHAZAM template you've mentioned early in the
> > thread:
> >
> > template
> > struct my_type { ... } // Note: no ::type member
> >
> > typedef SHAZAM > g
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_ p
David A. Greene wrote:
> But consider this testcase:
>
> //#define CT_DEBUG
>
> //#include "ct_print.hh"
> #include
> #include
>
> template
> struct my_type {
> };
>
> template
> struct my_type_generator {
>typedef my_type type;
> };
>
> template class Base,
>typename T, typename
Aleksey Gurtovoy wrote:
my_type is not a metafunction so maybe it just
can't be used conveniently with mpl.
Not now. However, I constantly keep finding more and more use cases to be
inclined to provide a built-in library support for this particular
metafunction's form - in particular, so that
David Abrahams wrote:
I suppose not. What I really wanted was the ability to take a
regular old template class and create a generator out of it:
template
struct my_type { ... } // Note: no ::type member
typedef SHAZAM > generator;
typedef generator::template apply::type my_type_inst;
I want
David A. Greene wrote:
> [Posted to boost because MPL is not yet released. At what
> point should these questions go to boost-users?]
It's mainly the content of the message that determines whether it should be
posted here or to the Boost Users list; the status of the library - is it in
developm
"David A. Greene" <[EMAIL PROTECTED]> writes:
> David Abrahams wrote:
>
>>>Your correction above makes everything clear to me now.
>> So do you feel you need an additional library feature? ;-)
>
> I suppose not. What I really wanted was the ability to take a
> regular old template class and crea
David Abrahams wrote:
Your correction above makes everything clear to me now.
So do you feel you need an additional library feature? ;-)
I suppose not. What I really wanted was the ability to take a
regular old template class and create a generator out of it:
template
struct my_type { ...
"David A. Greene" <[EMAIL PROTECTED]> writes:
>> 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
David Abrahams wrote:
template
struct my_type_generator
{
typedef my_type type;
};
lambda does it
Oops, I meant
lambda >
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
"David A. Greene" <[EMAIL PROTECTED]> writes:
>
>> template
>> struct my_type_generator
>> {
>> typedef my_type type;
>> };
>> lambda does it
Oops, I meant
lambda >
of course!
> , unless of course your compiler
>> needs BOOST_MPL_AUX_LAMDA_SUPPORT. I don't think i
> [mailto:[EMAIL PROTECTED]]On Behalf Of David A. Greene
> Sent: 05 December 2002 16:56
>
>
> Is the problem that my_type doesn't contain a ::type
> member? my_type is not a metafunction so maybe it just
> can't be used conveniently with mpl.
IIRC mpl::lambda does need metafunctions to wor
David Abrahams wrote:
template
struct my_type_generator {
template
struct apply {
typedef my_type type;
};
};
Looks good to me.
Is there a convenient way to create this with MPL?
You want it to be more convenient than that?!
Perhaps "convenient" is the wrong word. There a
"David A. Greene" <[EMAIL PROTECTED]> writes:
> [Posted to boost because MPL is not yet released. At what
> point should these questions go to boost-users?]
>
> Say I have a type my_type:
>
> template
> struct my_type { ... }
>
> Now let's say I want to create a generator that
> binds T to some
17 matches
Mail list logo