
12 Sep
2013
12 Sep
'13
7:24 a.m.
On Sep 12, 2013 8:15 AM, "klaus triendl"
Am Wed, 11 Sep 2013 23:01:04 +0000 schrieb Nathan Ridge
: 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?