Hello to all expert C++ programmer,

Code:
template <typename T, class edgeType = edge>
class graph
{	
public:
/*
  shared_ptr's template parameter is object 
  and not pointer to object
*/
	typedef boost::shared_ptr<vertex<T> > 
		vertexPtr;
private:

	std::vector<vertexPtr> allVertex;
I want that when different type of edgeType is supplied, then i want instantiated different type of vertexPtr.

I have two type of edgeType, one is edge(undirected) and arcs(Directed).

Whenever user supplied, graph<int, arcs> DAG;, then in the

Code:
typedef boost::shared_ptr<arcs> arcsPtr;
typedef boost::shared_ptr<vertex<T, arcsPtr> > vertexPtr;
should have arcsPtr.

Then, if user graph<int> supplied this, then default vertexPtr should be used.

I hope this make sense to you all.

Traits or CRTP or any design patterns is greatly appreciated by me.

The purpose of this question is to declare a graph class template that works with directed and undirected class based on template parameter.

graph<int> grp -- Undirected;
graph(int, arcs> -- directed;


Thanks for your help.