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