aboutsummaryrefslogtreecommitdiff
path: root/template/cpp/snip-stl-for_each.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'template/cpp/snip-stl-for_each.cpp')
-rw-r--r--template/cpp/snip-stl-for_each.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/template/cpp/snip-stl-for_each.cpp b/template/cpp/snip-stl-for_each.cpp
new file mode 100644
index 0000000..760b37f
--- /dev/null
+++ b/template/cpp/snip-stl-for_each.cpp
@@ -0,0 +1,3 @@
+std::for_each({{_input_:variable}}.begin(), {{_input_:variable}}.end(), [&](decltype({{_input_:variable}})::value_type x) {
+ {{_cursor_}}
+});