// compiled on Linux 64: // g++ -std=c++0x -I/home/user/local/boost/include -frounding-math -O2 x.cpp -o x.exe #include #include #include // must on top int main(int, char *[]) { using namespace boost; typedef adjacency_list < listS, vecS, directedS > G; G g; add_edge(0,1, g); adjacency_list <> tc; transitive_closure(g, tc); print_graph(tc); return 0; }