Ask HN: Good C++ code bases to read?
If you&#x27;re new to C++11, Captain Proto (particularly the kj library embedded within it-- src&#x2F;kj ) is a great read: <a href="https:&#x2F;&#x2F;github.com&#x2F;capnproto&#x2F;capnproto" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;capnproto&#x2F;capnproto</a>   kj semi-re-implements several core C++11 features like Own and Maybe (actually Maybe &#x2F; std::optional is still pretty new!)  <a href="https:&#x2F;&#x2F;github.com&#x2F;capnproto&#x2F;capnproto&#x2F;blob&#x2F;master&#x2F;c++&#x2F;src&#x2F;kj&#x2F;memory.h" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;capnproto&#x2F;capnproto&#x2F;blob&#x2F;master&#x2F;c++&#x2F;s...</a>    Why did Kenton do this?  He can speak for himself, but the core of Captain Proto is &#x2F;roughly&#x2F; like a serializable &#x2F; portable memory arena, so it was necessary for the design.  Reading through kj and _comparing_ it with C++11 will give you some great initial insight into why both are implemented the ways they are.  I&#x27;m not really advocating you use kj directly or adopt things like capnp&#x27;s unique comment style, but the codebase is nevertheless very well organized and clear.<p>Some of the older glog code is pretty nice with regards to a very vanilla and portable treatment of macros <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;glog&#x2F;tree&#x2F;master&#x2F;src&#x2F;glog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;glog&#x2F;tree&#x2F;master&#x2F;src&#x2F;glog</a><p>While I wouldn&#x27;t necessarily recommend Boost as a model project &#x2F; repo ( <a href="https:&#x2F;&#x2F;github.com&#x2F;boostorg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;boostorg</a> ), it&#x27;s worth checking out to help understand why modern decisions were made the way they were.