Skip to content

narrow_cast instead of static_cast - #1250

Merged
Carson Radtke (carsonRadtke) merged 1 commit into
microsoft:mainfrom
beinhaerter:vs2026-warnings
May 27, 2026
Merged

narrow_cast instead of static_cast#1250
Carson Radtke (carsonRadtke) merged 1 commit into
microsoft:mainfrom
beinhaerter:vs2026-warnings

Conversation

@beinhaerter

Copy link
Copy Markdown
Contributor

This removes the "warning C26472: Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narrow (type.1)." issued by VS2026.

This removes the "warning C26472: Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or gsl::narrow (type.1)." issued by VS2026.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, thanks!

@carsonRadtke
Carson Radtke (carsonRadtke) merged commit 66ca39d into microsoft:main May 27, 2026
87 checks passed
@beinhaerter
Werner Henze (beinhaerter) deleted the vs2026-warnings branch May 28, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants