mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Type.5.1 actually belongs after Type.4
So making it Type.4.1 for now
This commit is contained in:
parent
901b301b1f
commit
e436db0a0e
|
@ -17351,8 +17351,8 @@ Type safety profile summary:
|
|||
* [Type.2: Don't use `static_cast` downcasts. Use `dynamic_cast` instead](#Pro-type-downcast)
|
||||
* [Type.3: Don't use `const_cast` to cast away `const` (i.e., at all)](#Pro-type-constcast)
|
||||
* [Type.4: Don't use C-style `(T)expression` casts that would perform a `static_cast` downcast, `const_cast`, or `reinterpret_cast`](#Pro-type-cstylecast)
|
||||
* [Type.4.1: Don't use `T(expression)` for casting](#Pro-fct-style-cast)
|
||||
* [Type.5: Don't use a variable before it has been initialized](#Pro-type-init)
|
||||
* [Type.5.1: Don't use `T(expression)` for casting](#Pro-fct-style-cast)
|
||||
* [Type.6: Always initialize a member variable](#Pro-type-memberinit)
|
||||
* [Type.7: Avoid accessing members of raw unions. Prefer `variant` instead](#Pro-fct-style-cast)
|
||||
* [Type.8: Avoid reading from varargs or passing vararg arguments. Prefer variadic template parameters instead](#Pro-type-varargs)
|
||||
|
@ -17548,7 +17548,7 @@ Note that a C-style `(T)expression` cast means to perform the first of the follo
|
|||
|
||||
Issue a diagnostic for any use of a C-style `(T)expression` cast that would invoke a `static_cast` downcast, `const_cast`, or `reinterpret_cast`. To fix: Use a `dynamic_cast`, `const`-correct declaration, or `variant`, respectively.
|
||||
|
||||
### <a name="Pro-fct-style-cast"></a>Type.5.1: Don't use `T(expression)` for casting.
|
||||
### <a name="Pro-fct-style-cast"></a>Type.4.1: Don't use `T(expression)` for casting.
|
||||
|
||||
##### Reason
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user