this post was submitted on 13 Sep 2025
34 points (97.2% liked)
C++
2122 readers
3 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The new C++ way is
Neat, I learned something. I keep smashing C and C++ together on my head.
The notes on that page do suggest the same method I did, however.
First: it's not new, it's been around since C++03.
Second... it's not even that great. It's more characters to type and you have to deal with
std
s and colons.(void)
is a classic and works everywhere.But hey, at least it's not
static_cast<void>(...)
.