Sun Studio 12 Update 1: C++ User's Guide

6.6.1 Template Specialization Declaration

You must declare a specialization before any use of that combination of template arguments. The following examples declare specialized implementations of twice and sort.


template <> unsigned twice<unsigned>( unsigned original );

template <> sort<char*>(Array<char*> store);

You can omit the template arguments if the compiler can unambiguously determine them. For example:


template <> unsigned twice(unsigned original);

template <> sort(Array<char*> store);