Hi, Thank you all for responding to my post. Now I have my own operator function object for the comparison as you advised: struct cmp_edge : public std::binary_function<Edge, Edge, bool> { bool operator()(const Edge &e1, const Edge &e2) const { return e1.get_property() < e2.get_property(); } }; Now I can use std::map<Edge, double, cmp_edge>. Thanks & best, Irek Jeremy Siek wrote:
Yes, I also recommend the function object approach. You won't have to worry about which namespace the function object is in... this avoids the argument dependent lookup issues that caused problems for the global operator<.
Cheers, Jeremy
On Apr 20, 2006, at 10:26 PM, Thomas Costa wrote:
write your own total ordering/comparison function object for Edge objects and declare the map type using this function.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users