
Am Thursday 12 November 2009 15:41:11 schrieb Jeremiah Willcock:
On Thu, 12 Nov 2009, Stefan Strasser wrote:
Am Thursday 12 November 2009 12:05:33 schrieb Cosimo Calabrese:
using namespace std::rel_ops;
to add the generic operator!=(), but the compiler doesn't find it, the compiler error is the same.
using namespace std::rel_ops; (or your free function, it's the same thing) needs to be before the point operator != is used. I didn't realize this because GCC accepts it if it's there at the point of instantiation, but other compilers don't. so try to put it at the beginning of the file, before including the graph library.
this is only a workaround though. the graph library shouldn't use operator!= if its only requirement on the type is EqualityComparable. have you filed a bug ticket?
operator!= is required by EqualityComparable, at least according to the SGI STL and Boost.ConceptCheck requirements.
as discussed in the other thread, I think SGI is either mistaken or outdated here. a lot of SGI STL was written before C++ was standardized and some stuff was kept for compatibility. in this draft of the standard from 2005(!) there is no such requirement: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf see page 421