|
Boost : |
Subject: Re: [boost] proposal for metafunction mpl::eval
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-09-12 03:24:57
On Sep 12, 2013 8:15 AM, "klaus triendl" <klaus_at_triendl.eu> wrote:
>
> Am Wed, 11 Sep 2013 23:01:04 +0000
> schrieb Nathan Ridge <zeratul976_at_[hidden]>:
>
> > >> You can only derive from class types, so this can't be used with
> > >> metafunctions returning scalar types, references, pointers,
> > >> arrays, or functions.
> > >
> > > I'm aware of this, however the implementation could be different:
> > >
> > > template<typename F>
> > > struct eval
> > > {
> > > typedef typename F::type type;
> > > }
> >
> > This is now a different metafunction - you have to write
> >
> > typename eval<F>::type
>
> You're damn right!
>
> However I don't see a practical problem here:
> Regarding my motivating case, eval_if anyway expects an integral
> constant as its evaluation condition, therefore F must yield an integral
> constant.
What problem are you trying to solve by adding this metafunction?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk