This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 113d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-03-20


1804. Partial specialization and friendship

Section: 13.7.5  [temp.friend]     Status: CD4     Submitter: Steve Clamage     Date: 2013-11-01

[Moved to DR at the November, 2014 meeting.]

According to 13.7.5 [temp.friend] paragraph 5,

A member of a class template may be declared to be a friend of a non-template class. In this case, the corresponding member of every specialization of the class template is a friend of the class granting friendship. For explicit specializations the corresponding member is the member (if any) that has the same name, kind (type, function, class template, or function template), template parameters, and signature as the member of the class template instantiation that would otherwise have been generated.

Should this treatment of members of explicit specializations also apply to members of partial specializations?

Proposed resolution (February, 2014):

Change 13.7.5 [temp.friend] paragraph 5 as follows:

A member of a class template may be declared to be a friend of a non-template class. In this case, the corresponding member of every specialization of the primary class template and class template partial specializations thereof is a friend of the class granting friendship. For explicit specializations and specializations of partial specializations, the corresponding member is the member (if any) that has the same name, kind (type, function, class template, or function template), template parameters, and signature as the member of the class template instantiation that would otherwise have been generated. [Example:...