Opened 11 years ago
Closed 11 years ago
#6137 closed Bugs (fixed)
New reverse_graph_edge_descriptor type missing operators
| Reported by: | 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;
}
Note:
See TracTickets
for help on using tickets.

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