3 ms·
If I would rework that snippet to be in C instead of C++, that code would no longer be my today’s WTF. Also, IMO `std::max` is more readable than the equivalent
by Const-me 3y ago
If I would rework that snippet to be in C instead of C++, that code would no longer be my today’s WTF. Also, IMO `std::max` is more readable than the equivalent conditional operator.
- gosub100 3y agoIts irrelevant and a different language. might as well post ocaml or julia
- Const-me 3y agoVery relevant. Apart from a few minor exceptions, C++ is a superset of C i.e. almost any C code can be compiled as C++ language, and will result in a correct program.
- ryao 3y agoTry compiling C code using union types for their intended type punning purpose as C++. It will compile, but bad things could happen. :/