extends c priority 1 snippet enum "Enumeration" enum ${1:name} { $0 }; endsnippet snippet for "For loop, index or range" for (${1:auto} ${2:index} ${3/(.*;.*)|(\w*)/(?1:=:\:)/} ${3:0; $2 < ${4:count}; $2${5:++}}) { $0 } endsnippet snippet struct "Structure" struct ${1:name} { $0 }; endsnippet snippet class "Class" class ${1:name} { public: ${1/(\w+)\s.*/$1/}(); ~${1/(\w+)\s.*/$1/}(); $0 }; endsnippet snippet template "Template" template $0 endsnippet snippet namespace "Named or anonymous namespace" namespace ${1:}${1/\w+/ /}{ $0 }${1/\w+/ \/\/ $0/} endsnippet snippet const_cast "Const cast" const_cast<$1>($2)$0 endsnippet snippet dynamic_cast "Dynamic cast" dynamic_cast<$1>($2)$0 endsnippet snippet static_cast "Static cast" static_cast<$1>($2)$0 endsnippet snippet reinterpret_cast "Reinterpret case" reinterpret_cast<$1>($2)$0 endsnippet snippet [] "Labmda function" [$1]($2)${3/(.*)/(?1: -> ::)/}$3 {$0} endsnippet snippet static_assert "Static assert" static_assert($1, "$2"); endsnippet