From b7ea3ba6902b52a19903f52a1b2125b5f861e271 Mon Sep 17 00:00:00 2001 From: Gueunet Charles Date: Tue, 12 Apr 2016 22:12:21 +0200 Subject: [PATCH] Add snippet for casting in CPP --- snippets/cpp.snippets | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/snippets/cpp.snippets b/snippets/cpp.snippets index ca9fbe3..1539d5f 100644 --- a/snippets/cpp.snippets +++ b/snippets/cpp.snippets @@ -106,6 +106,19 @@ snippet cout snippet cin std::cin >> ${1}; ## +## Casts +# static +snippet sca + static_cast<${1:unsigned}>(${2:expr})${3} +# dynamic +snippet dca + dynamic_cast<${1:unsigned}>(${2:expr})${3} +# reinterpret +snippet rca + reinterpret_cast<${1:unsigned}>(${2:expr})${3} +# const +snippet cca + const_cast<${1:unsigned}>(${2:expr})${3} ## Iteration # for i snippet fori