I am trying to define a graph, where the vertex class is defined with a template. How do I then define a pointer to this templated vertex in another class. 

```
template<class T1, class T2>
class Vertex {
public:
  virtual T1 run(T2) = 0;
};

class Graph {
  std::map<std::string, Vertex*> vertices; // <--- How do I do something like this
  int** adjacency_matrix;
public:
  void run() {
     ...
  }
};

```

I have been looking at some other questions on Stack-Overflow, the common suggestion seems to be to use a base class that is not templated, and use the pointers for that and putting the common functions in that class.
However, in my code, the function `run()` which is the common one and uses the template for the return type. So I do not understand how to use the base class.

Any ideas?