summaryrefslogtreecommitdiff
path: root/c++-mode/fni
diff options
context:
space:
mode:
Diffstat (limited to 'c++-mode/fni')
-rw-r--r--c++-mode/fni11
1 files changed, 11 insertions, 0 deletions
diff --git a/c++-mode/fni b/c++-mode/fni
new file mode 100644
index 0000000..de0a6e8
--- /dev/null
+++ b/c++-mode/fni
@@ -0,0 +1,11 @@
+# -*- mode: snippet -*-
+# name: find_if
+# key: fni
+# --
+auto pos = std::find_if(std::begin(${1:container}), std::end($1), []($2) {
+ $3
+});
+if (pos != std::end($1)) {
+ $4
+}
+$0