Subclassing templates
October 9th, 2009 § 4 Comments
In this post I will introduce a common problem you are likely to bump into when inheriting from templated base classes.
Exception specifications
October 6th, 2009 § 9 Comments
C++ provides a mechanism that allows any function to declare exactly which exception types it may throw, and these declarations are actually enforced in runtime. We will review exactly how this mechanism works, and why it is usually left unused.
One-line rsort of an integer array
October 3rd, 2009 § 1 Comment
Suppose you have an array of integers and a comparator function object. Your mission, should you choose to accept it, is to sort the array in a reversed order.. Using only a single line of code.