]> git.rmz.io Git - dotfiles.git/commitdiff
vim: add snippet for spaceship operator
authorSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:32:02 +0000 (17:32 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:36:20 +0000 (17:36 +0000)
vim/ultisnips/cpp.snippets

index 1d44b8c92f5e8ad44546d221fb9a64a5fbdf7449..a677d5f5f5c98c7be4c0118321fc1af81ddc9e04 100644 (file)
@@ -35,6 +35,10 @@ $1 &operator=($1 const &) = 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)"
 namespace${1/.+/ /m}${1} {
 ${VISUAL}${0}