Skip to content

Commit 10de807

Browse files
authored
Add C++ Core Guidelines link to C26472
1 parent c9741f7 commit 10de807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/code-quality/c26472.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: 51e215a7-0e0a-4e6c-bff1-805bf5b1af29
1111
"Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast, or gsl::narrow."
1212

1313
**C++ Core Guidelines**:
14-
Type.1: Avoid casts
14+
[Type.1](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#prosafety-type-safety-profile): Avoid casts
1515

1616
This rule helps to find places where static casts are used to convert between integral types. These casts are unsafe because the compiler would not warn if any data loss occurs. Brace initializers are better for the cases where constants are used, and a compiler error is desired. There are also utilities from the Guidelines Support Library that help to describe intentions clearly:
1717

0 commit comments

Comments
 (0)