Lancern's Treasure Chest
08:14 · Aug 12, 2023 · Sat
The style guide must say how to do what you mustn’t do
via
Arthur O’Dwyer
Arthur O’Dwyer
The style guide must say how to do what you mustn’t do
Consider the following snippets of C++ code. Which ones do you think a good compiler would warn about?
[[nodiscard]] int f();
f();
(void)f();
(int)f();
int dummy = f();
[[maybe_unused]] int dummy = f();
int _ = f();
I recently heard someone complaining…
Home
Powered by
BroadcastChannel
&
Sepia