Subject: Re: [boost] [Variant] [BGL] Variant<edge_descriptor, edge_descriptor> is not EqualityComparable
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-11-12 09:41:11
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
> 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.
-- Jeremiah Willcock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk