Explicit (full) template specialization

Allows customizing the template code for a given set of template arguments.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
CWG 531C++98the syntax of defining members of explicitspecializations in namespace scope was not specifiedspecified
CWG 727C++98partial and full specializations not allowed inclass scopeallowed in any scope
CWG 730C++98member templates of non-templateclasses could not be fully specializedallowed
CWG 2478C++20it was unclear whether the constinit and consteval of theprimary template are carried over into its explicit specializationsnot carried over
CWG 2604C++11it was unclear whether the attributes of the primarytemplate are carried over into its explicit specializationsnot carried over

# See also