For assigning shared_ptr to a Graph type variable in lemon graph library i did this:
typedef ListDigraph Graph;
typedef std::shared_ptr<Graph> Process_pointer;
Process_pointer process(new Graph);
It worked fine, but now i need to declare a shared_ptr for a map object, Normally the map object works like this :
Graph process;
typedef ListDigraph::NodeMap<string> Node_names;
Node_names name(process);
That is, name requires a Graph object for its default constructor.
For declaring a shared_ptr for it, i did this:
typedef ListDigraph::NodeMap<string> Node_names;
typedef std::shared_ptr<Node_names> Nname_pointer;
Nname_pointer name = new Node_names;
name(process);
I know, the declaration for name is wrong, but how do i assign it memory as well as initialise it with process object.