I
Igor R.
Hello,
I'd like to make 2 different implementations of a function, depending
on a CT bool parameter, but the caller should not pass a template arg
explicitly:
f(true); // one implementation
f(false); // another one
Is it possible to deduce a template argument in this case?
I tried it this way:
template <bool b>
void f(bool b)
{}
It doesn't work - arg b jusst hides the template arg (MSVC9).
Thanks!
I'd like to make 2 different implementations of a function, depending
on a CT bool parameter, but the caller should not pass a template arg
explicitly:
f(true); // one implementation
f(false); // another one
Is it possible to deduce a template argument in this case?
I tried it this way:
template <bool b>
void f(bool b)
{}
It doesn't work - arg b jusst hides the template arg (MSVC9).
Thanks!