From 8e48c6e3c75b4aa580aa971be9c4c2357c1e99c3 Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 17 May 2012 17:37:20 +0900 Subject: std::for_each --- template/cpp/snip-cout.cpp | 1 - template/cpp/snip-std-cout.cpp | 1 + template/cpp/snip-std-for_each.cpp | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 template/cpp/snip-cout.cpp create mode 100644 template/cpp/snip-std-cout.cpp create mode 100644 template/cpp/snip-std-for_each.cpp (limited to 'template') diff --git a/template/cpp/snip-cout.cpp b/template/cpp/snip-cout.cpp deleted file mode 100644 index cf75f01..0000000 --- a/template/cpp/snip-cout.cpp +++ /dev/null @@ -1 +0,0 @@ -std::cout << {{_input_:string}} << std::endl; diff --git a/template/cpp/snip-std-cout.cpp b/template/cpp/snip-std-cout.cpp new file mode 100644 index 0000000..cf75f01 --- /dev/null +++ b/template/cpp/snip-std-cout.cpp @@ -0,0 +1 @@ +std::cout << {{_input_:string}} << std::endl; diff --git a/template/cpp/snip-std-for_each.cpp b/template/cpp/snip-std-for_each.cpp new file mode 100644 index 0000000..760b37f --- /dev/null +++ b/template/cpp/snip-std-for_each.cpp @@ -0,0 +1,3 @@ +std::for_each({{_input_:variable}}.begin(), {{_input_:variable}}.end(), [&](decltype({{_input_:variable}})::value_type x) { + {{_cursor_}} +}); -- cgit v1.2.3-54-g00ecf