Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A very (very) quick look gives an obvious answer of return type deduction and auto in lambda parameters (so, generic lambdas).

It's definitely possible (même likely?) there are other more subtle things in use too.



I would expect that the project also uses const iterators (cbegin, cend, etc) which didn't make it into C++11, and probably make_unique<T>, which also never made it into C++11, even though it very well would have (if it had been implemented before the cutoff date).

In any case, most of C++14 (outside of automatic lambda parameter deduction) can be emulated or straight copied into C++ using C++11. Most of the implementations of library specific things can be found at [1], so if you find a feature in C++14 that you're missing, go ahead and search the draft standard files (most of which are verbatim the same implementation) and copy into your own project.

To be fair though, one of the bigger features of C++11 / C++14 brings to the table is just easier template / std::algorithm usage (via lambdas), and smart pointers. Beyond that, most things aren't as necessary or as widespread in use even within std / STL. So for the most part, if you (or parent) has been interested in learning some modern C++, for the most part you can start leveraging a lot of the more useful tools / tricks immediately, even if the compilers haven't fully implemented C++14 yet [2].

[1] https://isocpp.org/files/papers/

[2] My understanding is that libc++ and clang are fully caught up, but g++ / libstdc++ won't be 100% C++14 compliant until after gcc-5.0. Either way, the corner cases exist, but for the most part you can take advantage of most of the great areas of modern C++ without waiting for gcc-5.0.


> I would expect that the project also uses const iterators (cbegin, cend, etc) which didn't make it into C++11, and probably make_unique<T>, which also never made it into C++11, even though it very well would have (if it had been implemented before the cutoff date).

Const iterators in the form of cbegin() and cend() member functions on the standard containers were part of C++11, I'm pretty sure. It's either that or the C++ Primer 5e included some post-C++11 things in it.

What was missing from C++11, and probably an oversight, was std::cbegin() and std::cend() free functions, a la std::begin() and std::end(), for overloading and C arrays and so forth.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: