summaryrefslogtreecommitdiff
path: root/c++-mode/rmi
diff options
context:
space:
mode:
Diffstat (limited to 'c++-mode/rmi')
-rw-r--r--c++-mode/rmi12
1 files changed, 12 insertions, 0 deletions
diff --git a/c++-mode/rmi b/c++-mode/rmi
new file mode 100644
index 0000000..7cb47ab
--- /dev/null
+++ b/c++-mode/rmi
@@ -0,0 +1,12 @@
+# -*- mode: snippet -*-
+# name: remove_if
+# key: rmi
+# contributor: Tommy BENNETT and Ludwig PACIFICI <ludwig@lud.cc>
+# --
+auto pos = std::remove_if(std::begin(${1:container}), std::end($1), []($2) {
+ $3
+});
+if (pos != std::end($1)) {
+ $4
+}
+$0