Subject: [Boost-bugs] [Boost C++ Libraries] #6137: New reverse_graph_edge_descriptor type missing operators
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-18 06:24:18
#6137: New reverse_graph_edge_descriptor type missing operators
-----------------------------------------------+----------------------------
Reporter: justin.viiret@⦠| Owner: jewillco
Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost 1.48.0 | Severity: Problem
Keywords: reverse_graph |
-----------------------------------------------+----------------------------
We noticed on upgrading the version of Boost we use to 1.48 that the
changes in reverse_graph.hpp broke our ability to construct an STL set of
reverse graph edge descriptors.
I think this is likely related to changeset [73997], where the
reverse_graph_edge_descriptor class was added; it has equals and not-
equals operators, but no less-than.
Adding "operator<" for the type seems to be enough to allow sets of
reverse edge descriptors, but adding the same set of operators available
for the underlying edge_descriptor might be warranted..?
{{{
@@ -36,6 +36,9 @@
friend bool operator==(const reverse_graph_edge_descriptor& a,
const reverse_graph_edge_descriptor& b) {
return a.underlying_desc == b.underlying_desc;
}
+ friend bool operator<(const reverse_graph_edge_descriptor& a, const
reverse_graph_edge_descriptor& b) {
+ return a.underlying_desc < b.underlying_desc;
+ }
friend bool operator!=(const reverse_graph_edge_descriptor& a,
const reverse_graph_edge_descriptor& b) {
return a.underlying_desc != b.underlying_desc;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6137> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC