I wonder whether it is possible to put the whole code of such a class inside the class (kind of as in Java). I\'m doing this for some piece of code, instead of having to search
It is completely possible though the specialization must be done in other template.
#include
template class A {
public:
A() {
std::cout<<"Generic"< class A
{
public:
A() { std::cout << "Bool specialization" << endl; }
};
int main(int argc, char** argv) {
A a;
A b;
}