Since this is unacceptable, here is one way:
template <int I> class Default{}; template <int N = 0, template<int> class T = Default> struct Class { void member() { worker(int2type<N>());
The idea is that when N = 1, the call to worker(int2type<N>())
will be resolved to the second function (specialization), because we pass an instance of type int2type<1>
. Otherwise, the first, general, function will be solved.
Nawaz source share