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