5 ms·
I would say, yes. C++11 is, in some ways, a totally new and more powerful language. I was sold on it as soon as I started learning. C++14 and C++17 add some use
by goodcanadian 6y ago
I would say, yes. C++11 is, in some ways, a totally new and more powerful language. I was sold on it as soon as I started learning. C++14 and C++17 add some useful features. I know basically nothing about C++20.
- pizza234 6y agoAs a non-C++ professional programmer question, what's the occurrence of the codebases you work on, where the standard is significantly/fundamentally C++ 14/17?
- goodcanadian 6y agoI don't know how to answer that. For me, it is 100%, but it is a small sample size and one where I, in part, set the standard. If you have a C++11 code base, you don't really lose anything by adopting C++17, and you do gain a few things.
- pizza234 6y agoInteresting; I've always mistakenly assumed that C++ codebases working with different standards would necessarily end up being a patchwork.
- goodcanadian 6y agoI'm sure someone will come up with a counterexample, but my experience is that pretty much everything is backwards compatible.
- bregma 6y agoC++17 was backwards compatible with the venerable C++11 in almost all ways except for the removal of some library constructs few people actually use and have long been replaced by superior models, like `std::auto_ptr` and the old binder functors.
- johannes1234321 6y agoIf you combine larger libraries from pre-eleven with post-eleven libraries you will see the different worlds (Qt as a prime example), small libraries can easily be enhanced with smart pointers etc. so do you don't have much of a clash. After eleven most features are nice things, which make things a bit nicer here or there, but don't change the code as much as reliance on moves and smart pointers do with eleven. Also upgrade from C++11 to C++17 is as painless as a compiler update can be. (Meaning: in some corner case you will probably hit some compiler optimization caused issue, but for most code it's a non-issue)
- BenFrantzDale 6y agoWe use C++17 to make our professional 3D printers go. We look forward to C++20 features when they become available. We shed a few hundred lines of code when we upgraded to 17 because we could drop hand-rolled stuff. It works. Nothing is meaningfully faster. And if you try hard it’s faster still.