In your opinion what are the best C++ projects you have really learned a lot from learning their code? The design should be very clean and easy to follow, although it can be very advanced and huge, to show how good designs can abstract complexity. And of course the code should be available for free.
views:
658answers:
13boost, boost, and boost.
Edit for clarification due to all the discussions going on in the comments: In general, boost libraries have a very good and very well thought-out interface that's shaped and reviewed by top-notch C++ programmers. If there was an interface I didn't find well designed right from the start, reading the library's rationale or following the design discussions usually taught me why I was wrong and they were right. Sure, the implementation is often hard to read, but that's to be expected in code that compiles with just about every compiler worth to be labeled "C++", and then some. Also, many quirky seeming functions come with a comment explaining why it was done in such a funny way -- that makes me imagine how, in my code, something like this would go unnoticed for years or decades, producing rare and impossible-to-find errors that I would bang my head against until my nose is flat. Heck, just looking at boost::shared_ptr<>
has taught me more than quite a few of the C++ books I read.
The Adobe Source Libraries, though not well known, has some real gems in it.
This isn't the answer to the question you asked, precisely, except obliquely. Have you read Meyers "Effective C++" and "More Effective C++". These are books with paper covers that you buy and read -- admittedly a primitive technique. I realize the internet puts a premium on things being FREE FREE FREE, but sometimes it helps to go with Ben Franklin, who is accused of having said "Empty your the coins from your purse into your mind, and your mind will fill your purse with coins".
QuantLib -- and also see the draft book on the design of the library.
This is not answering the question.
I've learnt more from reading and debugging crap code than from a well specified and well designed (and documented) code base. And yes, I've learnt from my own crap code!
Learning humility is hard.
boost is the best, but do not forget about wide range of Apache libraries (well, not so wide, and most of them written in C, but still interesting). Xerces-C++ was most useful for me.
I've learned a lot from the discussions on the development of the C++0x standard (sadly now deferred to 201x). It's brought me back to a lot of the STL that I never properly learned in the first place.
Also, the std::bind library in Modern C++ Design blew my mind and got me interested in C++ templates again.
ScummVM. It's really well thought out and put together - quite easy to dive into and read.
Poco's codebase certainly is clean and easy to understand. I am sure that most developers can learn a few good things from it.