Skip to content

Commit cb0744e

Browse files
committed
[C.183] make example compile
closes #2271
1 parent a446e94 commit cb0744e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9020,7 +9020,7 @@ If you wanted to see the bytes of an `int`, use a (named) cast:
90209020
void if_you_must_pun(int& x)
90219021
{
90229022
auto p = reinterpret_cast<std::byte*>(&x);
9023-
cout << p[0] << '\n'; // OK; better
9023+
cout << to_integer<unsigned>(p[0]) << '\n'; // OK; better
90249024
// ...
90259025
}
90269026

0 commit comments

Comments
 (0)