
12 Jan
2005
12 Jan
'05
4:28 p.m.
"Daniel Wallin" <dalwan01@student.umu.se> wrote
MPL uses a template_arity meta-function and specializations on the arity to work around this problem. Something like:
template<class T, int N> struct do_something;
template<template<class> class T, class P0> struct do_something<T<P0>, 1> { };
template<template<class, class> class T, class P0, class P1> struct do_something<T<P0, P1>, 2> { };
do_something<X, template_arity<X>::value>
HTH,
It does, thanks! Arkadiy