Opened 9 years ago

Last modified 9 years ago

#8962 new Bugs

adjacency_list doesn't work with hash_setS

Reported by: Rob Patro <rob.patro@…> Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.54.0 Severity: Regression
Keywords: Cc:

Description

When compiling under Clang (3.3 final), the following code results in a compile error due to template lookup failure. It compiles cleanly under G++ 4.8. Replacing hash_setS with setS allows the code to compile.

#include <boost/graph/adjacency_list.hpp>
#include <iostream>

int main(int argc, char* argv[]) {

    typedef boost::adjacency_list<boost::hash_setS, boost::vecS, boost::undirectedS > undirectedGraphT;
    undirectedGraphT G;
    boost::add_edge(1, 2, G);
    typedef boost::graph_traits <undirectedGraphT>::edge_descriptor Edge;
    Edge e;
    bool hasEdge{false};

    std::tie(e, hasEdge) = boost::edge(1, 2, G);

    std::cout << (hasEdge ? "did " : "did not ") << "find edge\n";
}

Attachments (1)

cout.txt (9.4 KB ) - added by Rob Patro <rob.patro@…> 9 years ago.
compiler output

Download all attachments as: .zip

Change History (2)

by Rob Patro <rob.patro@…>, 9 years ago

Attachment: cout.txt added

compiler output

comment:1 by Jeremiah Willcock, 9 years ago

(In [86137]) Made boost::unordered inclusion unconditional; removed support for non-partial-specialization compilers; enabled C++11 unordered containers when they are present; refs #8962

Note: See TracTickets for help on using tickets.