pointer delegate in STL set.
- by ananth
hi. Im kinda stuck with using a set with a pointer delegate. my code is as follows:
void Graph::addNodes (NodeSet& nodes)
{
for (NodeSet::iterator pos = nodes.begin();
pos != nodes.end(); ++pos)
{
addNode(*pos);
}
}
Here NodeSet is defined as:
typedef std::set NodeSet;
The above piece of code works perfectly on my windows machine, but when i run the same piece of code on a MAC, it gives me the following error:
no matching function for call to 'Graph::addNode(const boost::shared_ptr&)'
FYI, Node_ptr is of type: typedef boost::shared_ptr Node_ptr;
can somebody plz tell me why this is happening?