Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

6.6 Template Specialization

Treating some combinations of template arguments as a special case might provide some performance gains, as in the examples for twice in this section. Alternatively, a template description might fail to work for a set of its possible arguments, as in the examples for sort in this section. Template specialization allows you to define alternative implementations for a given combination of actual template arguments. The template specialization overrides the default instantiation.