EXPLORATION 51
Partial Template Specialization
Explicit specialization requires you to specify a template argument for every template parameter, leaving no template parameters in the template header. Sometimes, however, you want to specify only some of the template arguments, leaving one or more template parameters in the header. C++ lets you do just that and more, but only for class templates, as this Exploration describes.
Degenerate Pairs
The standard library defines the std::pair<T, U> class template in the <utility> header. This class template is a trivial holder of a pair of objects. The template arguments specify the types of these two ...
Get Exploring C++ 11, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.