How much more pleasant is it to write C++14 than C++98?

Quora Feeds

Active Member
Brian Bi


Considerably more pleasant.

  • You can write auto instead of std::map<std::string, std::vector<int>*>::iterator, or some other ugly type.
  • You can use range-based for loops.
  • You can use lambda functions instead of defining new functions or classes out-of-line just so you can use them in one std::sort call.
  • Since we have move semantics, functions can return “heavy” objects by value, instead of having the caller always pass in a pointer in order to avoid copies.
  • Smart pointers make memory management a breeze.

… and many more.



See Questions On Quora

Continue reading...
 

cindysimon

New Member
Yes, those are also some of my favorite features. In addition, the ability to close two angle brackets without an intervening space is a relief.

 
Last edited:
Top