msg = G_("default template arguments may not be used in "
"partial specializations");
+ else if (current_class_type && !CLASSTYPE_IS_TEMPLATE (current_class_type))
+ /* Per [temp.param]/9, "A default template-argument shall not be
+ specified in the template-parameter-lists of the definition of
+ a member of a class template that appears outside of the member's
+ class.", thus if we aren't handling a member of a class template
+ there is no need to examine the parameters. */
+ last_level_to_check = template_class_depth (current_class_type) + 1;
else
msg = G_("default argument for template parameter for class enclosing %qD");