Bumped into another templates problem:
The problem: I want to partially specialize a container-class (foo) for the case that the objects are pointers, and i want to
You can use inheritance to get this to work :
template
class foobase
{
public:
void addSome (T o) { printf ("adding that object..."); }
void deleteSome (T o) { printf ("deleting that object..."); }
};
template
class foo : public foobase
{ };
template
class foo : public foobase
{
public:
void deleteSome (T* o) { printf ("deleting that PTR to an object..."); }
};