The C++ Standard Library: A Tutorial and Reference

Category: Programming
Author: Nicolai M. Josuttis
4.5
All Stack Overflow 22
This Month Stack Overflow 2

Comments

by anonymous   2019-07-21

I use the The C++ Standard Library: A Tutorial and Reference and can highly recommend it. Of course it is not something you read cover-to-cover, but is an very handy reference. Check out the reviews on Amazon as well.

by anonymous   2019-07-21

There is so much material in the standard there is just no way to briefly describe it. I don't think your question is really answerable as written. If you want a reference for the standard library though, Josuttis' book http://www.amazon.com/Standard-Library-Tutorial-Reference/dp/0201379260/ref=sr_1_1?ie=UTF8&qid=1320994652&sr=8-1 is always a fantastic reference.

by anonymous   2017-08-20

If you want dead trees, maybe you'd be better off with a proper book? I found this one indispensable: The C++ Standard Library: A Tutorial and Reference by Nicolai M. Josuttis

by anonymous   2017-08-20

The best way to figure out what's happening 'under the bonnet' is to actually look under the hood and find the source code :)

Otherwise just read the documentation. I recommend this site, or this book.

by anonymous   2017-08-20

I believe your question is ill-posed. Look at what you have: a small one-liner function add_size and a call to std::accumulate. What's not to like?

You are somehow (for perhaps corporate reasons) restricted from using either Boost.Bind or Boost.Lambda, let alone C++11 (which standardized both std::bind and lambda expressions).

You want to eliminate that in favor of the C++03 binders which are horribly limited in their expressiveness (which is BTW one reason why Boost.Bind and Boost.Lambda were so popular) and would require much more boilerplate than what you currently have. Look at this appendix of the C++ Standard Reference book by Nicolai Jusuttis. He implements a general compose template that works "nicely" with std::bind2nd and friends. But look at which headers he uses to implement that: right, the Boost.Bind ones.

Your best approach is to simply copy Boost.Bind and/or Boost.Lambda, put them in your own source tree, and rename the namespace to your company's. Check whether this is in fact consistent with the Boost License. Boost even has a bcp tool to extract all the included dependencies for you. Then simply write whatever you need to using the bind or lambda facilities that you've just "written".

TL;DR: Do not Re-invent the Wheel. Familiarize yourself with Boost.