From 42da80ef76b80c64fa78b18fbd0c673312cbcf28 Mon Sep 17 00:00:00 2001 From: hsutter Date: Wed, 15 Mar 2017 10:42:56 -0700 Subject: [PATCH] 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. --- CppCoreGuidelines.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 26d5a4a..ae21d1e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -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) ### 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. -### Type.7: Don't use `T(expression)` for casting` +### Type.5.1: Don't use `T(expression)` for casting. ##### Reason