pointer delegate in STL set.

Posted by ananth on Stack Overflow See other posts from Stack Overflow or by ananth
Published on 2010-05-17T21:18:17Z Indexed on 2010/05/17 21:20 UTC
Read the original article Hit count: 209

Filed under:

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?

© Stack Overflow or respective owner

Related posts about predicate