2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-27 06:52:11 +00:00

added more warnings and examples

[SVN r11956]
This commit is contained in:
Jeremy Siek
2001-12-06 16:20:33 +00:00
parent dcde366d0e
commit 8ddcdfd33e

View File

@@ -28,6 +28,27 @@
BGL_FORALL_VERTICES(v, g, graph_t) {
bar(v);
}
Instead write this:
if (sky_is_blue) {
BGL_FORALL_VERTICES(v, g, graph_t) {
bar(v);
}
}
Another example of what NOT to write:
BGL_FORALL_VERTICES(u, g, graph_t)
BGL_FORALL_VERTICES(u, v, g, graph_t)
foo(u, v);
Instead write this
BGL_FORALL_VERTICES(u, g, graph_t) {
BGL_FORALL_VERTICES(u, v, g, graph_t)
foo(u, v);
}
It is OK to use single statements after the macro: