Subject: Re: [boost] [Variant] [BGL] Variant<edge_descriptor, edge_descriptor> is not EqualityComparable
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-11-12 10:54:51
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:
see page 421
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk