fork download
  1. #include <iostream>
  2. #include <utility>
  3. #include <algorithm>
  4. #include <vector>
  5.  
  6. #include "boost/graph/graph_traits.hpp"
  7. #include "boost/graph/adjacency_list.hpp"
  8.  
  9. using namespace boost;
  10.  
  11. int main(int argc, char *argv[])
  12. {
  13. typedef adjacency_list<vecS, vecS, undirectedS> UndirectedGraph;
  14. UndirectedGraph g;
  15. std::deque<int> topo_order;
  16. boost::topological_sort(g, std::front_inserter(topo_order));
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main(int, char**)’:
prog.cpp:16:3: error: ‘topological_sort’ is not a member of ‘boost’
   boost::topological_sort(g, std::front_inserter(topo_order));
   ^~~~~
stdout
Standard output is empty