Boost logo

Boost :

Subject: [boost] proposal for metafunction mpl::eval
From: klaus triendl (klaus_at_[hidden])
Date: 2013-09-11 16:26:01


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

I've found it somehow useful because it avoids syntactical sugar when
specifying a condition to be evaluated for eval_if:

eval_if< eval<apply<UnaryF, Arg>>,
         F1, F2

instead of writing:

eval_if< typename apply<UnaryF, Arg>::type,
         F1, F2

Any comments on this?

klaus triendl

Boost list run by bdawes at, gregod at, cpdaniel at, john at