Support printing (const) volatile void* - #4056
Merged
Merged
Conversation
Arghnews
force-pushed
the
volatile_void_pointer_support
branch
from
July 7, 2024 21:18
13860e8 to
63fb57c
Compare
vitaut
reviewed
Jul 9, 2024
Comment on lines
+429
to
+440
| auto check = [](const int val) { | ||
| CHECK_ARG( | ||
| char, reinterpret_cast<const void*>(val), | ||
| static_cast<volatile void*>(reinterpret_cast<volatile int*>(val))); | ||
| CHECK_ARG(char, reinterpret_cast<const void*>(val), | ||
| static_cast<const volatile void*>( | ||
| reinterpret_cast<const volatile int*>(val))); | ||
| }; | ||
| check(0); | ||
| check(1); | ||
| check(2); | ||
| check(0xbeef); |
Contributor
There was a problem hiding this comment.
I don't think we need to check various values here, let's get rid of the lambda and just check nullptr.
Contributor
Author
There was a problem hiding this comment.
I was just being safe to cover the behaviour with iostreams linked in https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1147r1.html but if you're happy for it to be removed I'll take it out
Arghnews
force-pushed
the
volatile_void_pointer_support
branch
from
July 9, 2024 20:04
63fb57c to
cc5e38f
Compare
Fixes #4049