You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be no prohibition on applying the static storage class specifier to a variable template partial specialization. Implementations accept this, and despite [basic.link] clearly saying that the name of the template has linkage rather than its specializations, they give specializations instantiated from a static partial specialization internal linkage even if the template has external linkage.
Suggested resolution:
Add a rule
A partial specialization declaration for a variable shall not have the storage-class-specifierstatic.
at a suitable place within [temp.spec.partial]. I would suggest not prohibiting extern as forward-declaring partial specializations is useful, per the primary topic of the above-mentioned reflector thread.
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
[temp.spec.partia] variable template partial specializations can be declared static
[temp.spec.partial] variable template partial specializations can be declared staticJul 29, 2024
jensmaurer
changed the title
[temp.spec.partial] variable template partial specializations can be declared static
CWG2916 [temp.spec.partial] variable template partial specializations can be declared staticJul 29, 2024
Reference (section label): [temp.spec.partial]
Link to reflector thread (if any): http://lists.isocpp.org/core/2024/07/16057.php
Issue description:
There appears to be no prohibition on applying the
static
storage class specifier to a variable template partial specialization. Implementations accept this, and despite [basic.link] clearly saying that the name of the template has linkage rather than its specializations, they give specializations instantiated from astatic
partial specialization internal linkage even if the template has external linkage.Suggested resolution:
Add a rule
at a suitable place within [temp.spec.partial]. I would suggest not prohibiting
extern
as forward-declaring partial specializations is useful, per the primary topic of the above-mentioned reflector thread.The text was updated successfully, but these errors were encountered: