Closed xmh0511 closed 1 year ago
The intent seems to be same as CWG2483 which is already resolved.
[dcl.link] p1 clearly describes the categories to which language linkage applies: functions, variables, function types. (The former two are understood to refer to the names.)
I think the phrasing in [dcl.link] p5 parallels the one in p1: function types are separated out from "class members and friend functions", which are in the non-function type category per p1.
Note that we never say that a "name" has language linkage; an entity has.
I'm not seeing a defect, and in particular the suggested resolution is worsening the situation.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[dcl.link] p5 says:
Consider this example:
A::fun
is a static member function, however, it is not clear how the extent "A C language linkage is ignored in determining the language linkage of class members" intends to apply. Does it only ignore the language linkage for the name of the class member, or both name and its type if it is a member function? The same issue exists for the friend functions.Suggested Resolution
The intent may be:
This means, for the static member function and friend function, their names keep the C++ language linkage but their types are affected by the C language linkage.