2 ms·
Because smart pointers are a different way to code. It is not a drop in feature that makes your code better without any design change. In all examples you can'
by GuB-42 8y ago
Because smart pointers are a different way to code. It is not a drop in feature that makes your code better without any design change.
In all examples you can't really argue. All these things are common patterns that require ugly hacks to work in traditional C++. Modern C++ made them the way people would naturally write them, and they don't involve self imposed restrictions or performance overheads.
The chrono stuff is a bonus, not included in the main 7, probably chosen because of the author personal experience. But I understand that if you work with code that involve a lot of timing, it can be a godsend. Time unit mismatch can be incredibly frustrating, I've experienced it myself both as the culprit and as a victim.