templates: add item 42 from Effective C++ own example