
11 Sep
2013
11 Sep
'13
8:26 p.m.
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 {}; 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