aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-11-12 22:06:33 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-11-12 22:06:33 +0100
commitc81bdbdadc72b96dda3c4a120bfb189df62ece18 (patch)
treec8b348d22d891a70322ef9caed6001c949f301af /doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
parent0105146915c62f732841bb63d5c2046ed7cb3864 (diff)
Add manual doc on STL-compatible iterators
Diffstat (limited to 'doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp')
-rw-r--r--doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
new file mode 100644
index 000000000..d8e582ad5
--- /dev/null
+++ b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
@@ -0,0 +1,4 @@
+VectorXi v = VectorXi::Random(4);
+cout << "Here is the vector v:\n";
+for(auto x : v) cout << x << " ";
+cout << "\n"; \ No newline at end of file