C++

Topic: Templates

Is it possible to specialise a member function of a class template without specialising the whole template? 

According to the standard, you can declare a full specialisation of a member function of a class template like this:template<typename T>class my_class {public:    bool func();    // other functions};template<>bool my_class<int>::func();Unfortunately not all compilers support this.

Browse random answers: