Joaquin M López Muñoz wrote:
1.7 mp_eval[_xx] functions should accept metafunctions in both their true
and false branches.
I can't make this work.
#include
#include <tuple>
template class F, class... T, template
class G, class... U> using eval_if = void;
int main()
{
using R = eval_if;
}
prog.cc:4:55: error: template parameter pack must be the last template
parameter
template class F, class... T, template
class G, class... U> using eval_if = void;
^
One might argue that it ought to work because G would obviously terminate
the first pack, but it doesn't. :-)
mp_eval_if_c, G, U...> is not
pretty but... it works.
There's also the option of typename mp_if_c,
mp_defer>::type.