2 ms·
People often don't realize that C++11 only brought syntactic sugar. Even unique pointers and move semantics can also be done in C++03, as e.g. demonstrated by B
by Rochus 4y ago
People often don't realize that C++11 only brought syntactic sugar. Even unique pointers and move semantics can also be done in C++03, as e.g. demonstrated by Boost.Move. So if people insist that "modern C++" started with C++11, they actually claim that it was the syntactic sugar which made C++ "modern".
- steveklabnik 4y agoWasn’t that also the auto_ptr/uniq_ptr transition too? Not that only one change like that means you’re wrong, or course, just testing my recollection since I’m obviously a bit off in my timelines.
- Rochus 4y agounique_ptr is usually the feature people mention if looking for a reason why C++11 is not just C++98/03 plus syntactic sugar, because it requires move semantics which was introduced with C++11; that's why I directly pointed to Boost.Move, which offers move semantics including a unique_ptr version compatible with C++98/03. Only in C++14 (or 17, I don't remember, have to look up) they added a feature for which no C++98/03 implementation is known/possible, but most people are not even aware of it (so that one feature is barely the justification of "modern").
- steveklabnik 4y agoThanks!