Fixed numbering in Type section

There were two Type.7's. Renumbered one of them to .5.1 for now, and
fixed the section table of contents.
This commit is contained in:
hsutter 2017-03-15 10:42:56 -07:00
parent 0af5e31eb2
commit 42da80ef76

View File

@ -17352,8 +17352,10 @@ Type safety profile summary:
* [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.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: Don't use `T(expression)` for casting`](#Pro-fct-style-cast)
* [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)
### <a name="Pro-type-reinterpretcast"></a>Type.1: Don't use `reinterpret_cast`.
@ -17546,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.7: Don't use `T(expression)` for casting`
### <a name="Pro-fct-style-cast"></a>Type.5.1: Don't use `T(expression)` for casting.
##### Reason