Modify

Opened 6 years ago

Closed 6 years ago

#6137 closed Bugs (fixed)

New reverse_graph_edge_descriptor type missing operators

Reported by: justin.viiret@… Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.48.0 Severity: Problem
Keywords: reverse_graph Cc:

Description

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;
       }

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Jeremiah Willcock

Resolution: fixed
Status: newclosed

(In [75547]) Added comparison operators; fixes #6137

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jeremiah Willcock.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.