Boost C++ Libraries: Ticket #6137: New reverse_graph_edge_descriptor type missing operators https://svn.boost.org/trac10/ticket/6137 <p> 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. </p> <p> I think this is likely related to changeset <a class="changeset" href="https://svn.boost.org/trac10/changeset/73997" title="Changed to custom edge_descriptor type in reverse_graph to avoid ...">[73997]</a>, where the reverse_graph_edge_descriptor class was added; it has equals and not-equals operators, but no less-than. </p> <p> Adding "operator&lt;" 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..? </p> <pre class="wiki">@@ -36,6 +36,9 @@ friend bool operator==(const reverse_graph_edge_descriptor&amp; a, const reverse_graph_edge_descriptor&amp; b) { return a.underlying_desc == b.underlying_desc; } + friend bool operator&lt;(const reverse_graph_edge_descriptor&amp; a, const reverse_graph_edge_descriptor&amp; b) { + return a.underlying_desc &lt; b.underlying_desc; + } friend bool operator!=(const reverse_graph_edge_descriptor&amp; a, const reverse_graph_edge_descriptor&amp; b) { return a.underlying_desc != b.underlying_desc; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6137 Trac 1.4.3 Jeremiah Willcock Fri, 18 Nov 2011 20:06:10 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6137#comment:1 https://svn.boost.org/trac10/ticket/6137#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75547" title="Added comparison operators; fixes #6137">[75547]</a>) Added comparison operators; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6137" title="#6137: Bugs: New reverse_graph_edge_descriptor type missing operators (closed: fixed)">#6137</a> </p> Ticket