Sometimes it is useful to be able iterate over all the elements of a std::map using standard algorithms like std::copy(), std::count(), std:...
New book on modern C++ idioms
For quite some time now, I am hoping to come across a book on modern C++ idiom as comprehensive as the Purple book by James Coplien! Finally...
const overload functions taking char pointers
Always have two overloaded versions of functions that take char * and const char * parameters. Declare (but don't define if not needed) ...
Future of C++ track @ ACCU
Recently held ACCU 2007 conference had a track dedicated to C++ called: Future of C++ Track. I have listed the presentations in that track ...
iterator tags idiom and compile-time algorithm selection
Compile-time algorithm selection can be done using function overloading and traits idiom . It is a quite useful technique in generic program...
Use of std::bad_exception
std::bad_exception is a useful device to handle unexpected exceptions in a C++ program , which works in conjunction with unexpected_handler....
Boost C++ Idioms
This time lets take a brief look at some nifty C++ idioms in the Boost peer-reviewed libraries. We will talk about Boost Base-from-Member i...
new, delete, custom memory allocation, and exception safety
This post will hopefully push you ahead to a higher level of expertise in memory management mechanics of C++ and exception safety. Here we g...
Non-Virtual Interface (NVI) idiom and the design intent
Assuming that the philosophy of Non-Virtual Interface (NVI) idiom is strictly adhered I came up with a table that summarizes the design int...
Virtuality is an implementation detail !
There are many ways of achieving separation of interface from implementation: 1. Using Interface Definition Language (IDL) as in CORBA 2. Br...
Forgotton friend: pointer/reference to an array
The name of an array "degenerates" into a pointer to the first element of the array. For example, int Array [10]; int *p = Array; ...
More C++ links
Danny Kalev, a former member of the C++ standards committee, posts really interesting updates about C++0x (now most likely C++09) on his blo...
Service Configurator pattern and singleton deletion
The Service Configurator pattern is about linking in additional functionality in an application dynamically by means of an API such as dlsym...
swap using XOR
In one of my previous posts I described a few ways of swapping two numbers using xor operation in a sinlge line. The discussion is not corr...
Publications by C++ experts
Articles by experts are saught after the most. Therefore, here are the links to the articles written by some of my favorite authors (in no p...
Ownership idioms, The Move Constructor idiom and auto_ptr
There are properties of objects that are relevant beyond mere identity of the object. One of such properties is Ownership! Who owns the obje...