4 ms·
This is dangerous advice. The same rant could be made about named structs, overloaded operators, or virtual functions. "With these stupid named structs now I ca
by Ace17 11y ago
This is dangerous advice.
The same rant could be made about named structs, overloaded operators, or virtual functions.
"With these stupid named structs now I can't know the offsets of the members I'm using!"
"Now I don't know anymore which function is being called!"
These are abstraction tools, allowing yourself to emancipate from low-level details, like memory layout and generated code.
If you need fine-grained low-level control over the code generation, why use a C++11 compiler at all?
- meshko 11y agonamed structs and overloaded operators are very similar to auto in terms of poor benefit to risk ratio. Virtual functions are more intuitive and solve a problem.