3 ms·
How about chromium? https://cs.chromium.org/chromium/src/?sq=package:chromium&type=cs https://cs.chromium.org/chromium/src/?sq=package:chromium&ty...
by lallysingh 10y ago
How about chromium?
https://cs.chromium.org/chromium/src/?sq=package:chromium&type=cs https://cs.chromium.org/chromium/src/?sq=package:chromium&ty...
- klodolph 10y agoChromium is nice, but it also uses a restricted subset of C++: std::unique_ptr, std::move, <algorithm> are okay, but no exceptions, shared pointers, etc. Most large C++ code bases are similar. LLVM also outlaws exceptions. Don't know about Firefox. So, while these code bases are wonderfully informative and good to learn from in many ways, they won't teach you "modern" C++ styles. I put "modern" in quotes because there's nothing wrong with choosing a style that doesn't use the latest whiz-bang features.
- lallysingh 10y agoLarge source bases take time to build, and if they're large now, started before those features became widely available. But look around a bit -- you'll find plenty of equivalents. Chromium has its own smart pointers library, and there's a good chance that they'll start shifting to the standard stuff over time.
- serge2k 10y agoYou also have companies which jump on the google style guide bandwagon. It's a fine guide, but it was written for google and has some stuff in there as a result of that (no exceptions being on example).
- amag 10y ago> Most large C++ code bases are similar [...] outlaws exceptions While I can understand the ideas behind it, exceptions do cause head aches, I find it really weird. Enforcing this means using a very limited part of the C++ standard library, e.g. no std::vector, std::map, etc, because all those can throw exceptions. If you say no to exceptions but yes to std::vector then you either need to write code that works in the presence of exceptions (which means you could just say yes to them) or you have shoved your head in the sand like an ostrich thinking if you can't see them they can't happen.