X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/612969653144b079f4d45f084ae132a7e41ff662..e72c1c2eb48b7ecbf8138cef0d1640a109041f08:/vim/ultisnips/cpp.snippets?ds=sidebyside diff --git a/vim/ultisnips/cpp.snippets b/vim/ultisnips/cpp.snippets index 5529a1a..9a959b8 100644 --- a/vim/ultisnips/cpp.snippets +++ b/vim/ultisnips/cpp.snippets @@ -16,8 +16,8 @@ snippet cl "class .. (class)" b class ${1:`!p snip.rv = snip.basename or "name"`} { public: - ${1/(\w+).*/$1/}(${2:arguments}); - virtual ~${1/(\w+).*/$1/}(); + ${1/(\w+).*/$1/}(${2:arguments}) = default; + virtual ~${1/(\w+).*/$1/}() = default; private: ${0:/* data */} @@ -145,3 +145,11 @@ snippet once "#pragma once" b ${0} endsnippet + +snippet ostream "operator<<(ostream)" b +inline std::ostream & operator<<(std::ostream &os, ${1:Type} const & rhs) +{ + os << ${0}; + return os; +} +endsnippet