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
Issue description:
The wording of https://eel.is/c++draft/dcl.type.simple#3 successfully achieves avoiding dependent templates for CTAD, but the wording fails to be explicit enough. In particular, naming a template template parameter names a template template parameter (not a deducible template).
The over.match.class.deduct wording similarly relies on this notion of naming a deducible template (https://eel.is/c++draft/over.match.class.deduct#3 starts with "the guides of the template named by the simple-template-id of the defining-type-id").
Implementations appear to allow deduction from a template template parameter but also appear to be unprepared for the implications of doing so.
Full name of submitter (unless configured in github; will be published with the issue): Hubert Tong
Reference (section label): dcl.type.simple, over.match.class.deduct
Link to reflector thread (if any): N/A
Issue description:
The wording of https://eel.is/c++draft/dcl.type.simple#3 successfully achieves avoiding dependent templates for CTAD, but the wording fails to be explicit enough. In particular, naming a template template parameter names a template template parameter (not a deducible template).
The over.match.class.deduct wording similarly relies on this notion of naming a deducible template (https://eel.is/c++draft/over.match.class.deduct#3 starts with "the guides of the template named by the simple-template-id of the defining-type-id").
Implementations appear to allow deduction from a template template parameter but also appear to be unprepared for the implications of doing so.
Clang, GCC, EDG, and MSVC all accept (https://godbolt.org/z/8Kevd9dze):
Clang, GCC, and EDG crash; MSVC rejects (https://godbolt.org/z/Pd9o76cWo):
Suggested resolution:
Add a note to the effect that naming a template template parameter does not name a deducible template.
The text was updated successfully, but these errors were encountered: