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