<p>I have a templated class defined (in part) as</p>

<pre><code>template &lt;class T&gt; MyClass
{
public:
   void DoSomething(){}
};
</code></pre>

<p>If I want to call DoSomething from another class, but be able to do this for multiple 'T' types in the same place, I am stuck for an idea as method functions pointers are uniquely constrained to the class type. Of course, each MyClass is a different type, so I can not store function pointers to MyClassDoSomething() in a 'polymorphic' way.</p>

<p>My use-case is I want to store, in a holding class, a vector of function pointers to 'DoSomething' such that I can issue a call to all stored classes from one place.</p>

<p>Has anyone any suggestions?</p>

Ok, so the functor solution doesn't work as you need. Perhaps you should have your template class inherit from a common base "Interface" class. And then you use a vector of those.
Something like this:
```
```
class Base { 
public:
  virtual ~Base(){}
  virtual void DoSomething() = 0;
}

template <class T> class MyClass : public Base {
public:
    void DoSomething(){}
};

std::vector<Base *> objects;
objects.push_back(new MyClass<int>);
objects.push_back(new MyClass<char>);
```
```