A
Andrew Tomazos
template<class T, bool signedness>
void f2(T);
template<class T>
void f2<T, true>(T t)
{
... do something with signed integer
}
template<class T>
void f2<T, false>(T t)
{
... do something with unsigned integer
}
template<class T>
void f(T t)
{
f2<T,numeric_limits<T>::is_signed>(t);
}
Compiler says no partial specialization.
How do I do what I'm trying to do?
-Andrew.
void f2(T);
template<class T>
void f2<T, true>(T t)
{
... do something with signed integer
}
template<class T>
void f2<T, false>(T t)
{
... do something with unsigned integer
}
template<class T>
void f(T t)
{
f2<T,numeric_limits<T>::is_signed>(t);
}
Compiler says no partial specialization.
How do I do what I'm trying to do?
-Andrew.