Boost logo

Boost :

Subject: Re: [boost] proposal for metafunction mpl::eval
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-09-11 16:32:00


On 11 September 2013 21:26, klaus triendl wrote:
> Hi,
>
> I'm not so much into meta-programming, so I'm not sure whether there's
> already an alternative available.
>
> Nevertheless I'd like to propose a new metafunction that simply
> evaluates its argument:
>
> template<typename F>
> struct eval: F::type
> {};

You can only derive from class types, so this can't be used with
metafunctions returning scalar types, references, pointers, arrays, or
functions.

C++11 provides what you want:

template<typename F>
  using eval = typename F::type;


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