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 <type_traits> #include <tuple> template<bool C, template<class...> class F, class... T, template<class...> class G, class... U> using eval_if = void; int main() { using R = eval_if<true, std::tuple, int, float, std::tuple, void>; } prog.cc:4:55: error: template parameter pack must be the last template parameter template<bool C, template<class...> class F, class... T, template<class...> 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<cond, mp_eval_if_c<!cond, void, F, T...>, G, U...> is not pretty but... it works. There's also the option of typename mp_if_c<cond, mp_defer<F, T...>, mp_defer<G, U...>>::type.