Hacker News new | past | comments | ask | show | jobs | submit login
Modern C++ – A collection of resources on modern C++ (awesomecpp.com)
35 points by gjvc 32 days ago | hide | past | favorite | 2 comments



I find the Chromium codebase to be one of the best resources for learning large-scale, high quality modern C++ best practices. They stay on a bleeding edge toolchain: near tip of tree clang, lld and libc++ is used on all platforms. They stay pretty recent on c++ standards — they’re on C++20 for the last year or so.

I think they are also contributing a lot of the new libc++ hardening features that have been landing: https://libcxx.llvm.org/Hardening.html IIRC, production chrome ships with Extensive hardening.

They also roll out massive code changes via automated clang rewrites. Recent examples are replacing all raw pointer members with their raw_ptr wrappers that bring some additional safety. They also switched from absl::optional to std::optional in one swoop.

If you haven’t done it before, take a browse through //base sometime, it’s got a lot of well commented code to learn from. You’ll see they’re already using c++20 concepts and requires clauses in a number of places.


Seems like we might be in the post-modern C++ age, since the Andrei Alexandrescu "Modern C++" book came out in 2001.




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

Search: