File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,20 @@ ms.date: 03/22/2018
44ms.topic : reference
55f1_keywords : ["C26493"]
66helpviewer_keywords : ["C26493"]
7+ description : CppCoreCheck rule that enforces C++ Core Guidelines Type.4
78---
89# C26493 NO_CSTYLE_CAST
910
10- Don't use C-style casts. See [ C++ Core Guidelines Type.4] ( https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#SS-type ) .
11+ Don't use C-style casts.
12+
13+ ## See also
14+ [ C++ Core Guidelines Type.4] ( https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#SS-type ) .
15+
16+ ## Example
17+ ``` cpp
18+ void function (const int* const_i)
19+ {
20+ int* nonconst_i = (int* )const_i; // C26493 Don't use C-style casts
21+ int i = (int)* const_i; // C26493 Don't use C-style casts
22+ }
23+ ```
You can’t perform that action at this time.
0 commit comments