X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/1e28bbc0f20964c20ff5a4a71d4130359c7d1ebf..4c549cf89c1d4afe55f6cf469fe604fda928cce6:/vim/ultisnips/cpp.snippets diff --git a/vim/ultisnips/cpp.snippets b/vim/ultisnips/cpp.snippets index 1142bf6..a677d5f 100644 --- a/vim/ultisnips/cpp.snippets +++ b/vim/ultisnips/cpp.snippets @@ -2,7 +2,9 @@ priority 1 # disable horrible one word snippets -clearsnippets pri pro pub fr mu t +clearsnippets pri pro pub fr mu t pr + +clearsnippets set snippet inc "#include <>" b #include <${1:iostream}> @@ -28,9 +30,13 @@ snippet rule5 "Default constructors/destructors/operaters" b ${1:classname}() = default; ~$1() = default; $1($1 const &) = default; -$1($1 &&) = default; +$1($1 &&) noexcept = default; $1 &operator=($1 const &) = default; -$1 &operator=($1 &&) = default; +$1 &operator=($1 &&) noexcept = default; +endsnippet + +snippet spaceship "defaulted spaceship operator <=>" +friend auto operator<=>(${1:type} const&, $1 const&) = default; endsnippet snippet ns "namespace .. (namespace)" @@ -46,7 +52,8 @@ ${4:void} ${1:`!p snip.rv = snip.basename or "name"`}::${2:memberFunction}(${3}) } endsnippet -snippet for "for loop (for)" +clearsnippets for +snippet fori "for loop (for)" b for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2}) { ${VISUAL}${0} @@ -161,3 +168,10 @@ ${VISUAL}${0} #pragma GCC diagnostic pop endsnippet +snippet FPP "FPP Copyright" b +// Copyright © Focal Point Positioning Limited `!v strftime("%Y")`. All Rights Reserved. +// This code is the copyright of Focal Point Positioning Limited and +// cannot be used, copied or distributed without the express written +// permission of Focal Point Positioning Limited. +${0} +endsnippet