Skip to content

Commit fce3171

Browse files
authored
Add C++ Core Guidelines link to C26475
1 parent c9741f7 commit fce3171

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/code-quality/c26475.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: 4ed71cf8-f155-4961-b4fe-77feb3b880c3
1111
"Do not use function style C-casts."
1212

1313
**C++ Core Guidelines**:
14-
ES.49: If you must use a cast, use a named cast
14+
[ES.49](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es49-if-you-must-use-a-cast-use-a-named-cast): If you must use a cast, use a named cast
1515

1616
Function-style casts (for example, `int(1.1)`) are another incarnation of C-style casts (like `(int)1.1`), which have questionable safety. Specifically, the compiler doesn’t try to check if any data loss can occur either in C-casts or in function casts. In both cases, it's better either to avoid casting or to use brace initializer if possible. If neither works, static casts may be suitable, but it is still better to use utilities from the Guidelines Support Library:
1717

0 commit comments

Comments
 (0)