Hi,
I am playing with metaprogramming. I have this problem:
template<bool f>
class A
{
public:
void P()
{
cout << "f = true" << endl;
}
void Q()
{
cout << "Q" << endl;
}
};
template<>
class A<false>
{
public:
void P()
{
cout << "f = false" << endl;
}
void Q()
{
cout << "Q" << endl;
}
};
because The Q function is not changed, I would prefer not to write it again in A<false>. Is there any way to do that?