graph vertices / IRIX / GCC
Hello,
Q: one can construct a graph using adjacency_list<>(N) and then
immediately iterate over the vertices, right?
The program below writes out the numbers 0 to 9 when compiled using
gcc 3.2 on linux. Ditto on my IRIX system, *unless* I try to
optimize. I expect this is a GCC optimizer bug, but I just want to be
sure I haven't overlooked something in the boost docs.
Thanks,
-S
#include <iostream>
#include
Graph;
int main() { Graph g( 10 ); boost::graph_traits<Graph>::vertex_iterator ui, ui_end; for (boost::tie(ui, ui_end) = boost::vertices(g); ui != ui_end; ++ui) { std::cout << "*ui = " << *ui << std::endl; } return 0; }
participants (1)
-
Steve M. Robbins