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
Another solution. Use the auxiliary function deleteSomeHelp
.
template
class foo {
public:
void addSome (T o) { printf ("adding that object...");
template
void deleteSomeHelp (R o) { printf ("deleting that object..."); }};
template
void deleteSomeHelp (R * o) { printf ("deleting that PTR to an object..."); }};
void deleteSome (T o) { deleteSomeHelp(o); }
}