Modify

Ticket #6137 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

New reverse_graph_edge_descriptor type missing operators

Reported by: justin.viiret@… Owned by: jewillco
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

Change History

comment:1 Changed 2 years ago by jewillco

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.