-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Regression in clang 16 -frelaxed-template-template-args
support to alias templates.
#63281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-frontend |
bisects to ef8feb6..f4ea3bd (using manyclangs) |
This appears to affect Apple's
|
Note that this didn't work in clang-15 properly either: https://godbolt.org/z/GbcEvW1cM Notice the previously incorrect deduction, which would produce a different instantiation, and so failing to diagnose the duplicate explicit instantiation. |
The latter issue, which I mentioned, of producing different instantiations is tracked by CWG1286, which is still unresolved, but we should probably implement provisional wording. There is already an LLVM issue for it: #65843 The original issue, failure to deduce an alias template, I believe clang is correct to reject it. See https://eel.is/c++draft/temp.deduct#type-8 and more specifically https://eel.is/c++draft/temp.deduct#type-8.2
An alias template is neither a class template nor a template template parameter. And see also this note: https://eel.is/c++draft/temp.alias#note-1
|
@mizvekov Edit: Actually, I'm not sure. What we are trying to deduce here is not the alias but its template arguments. Edit2: not that much divergence https://godbolt.org/z/jc77frbMz |
fails to compile on Clang 16 (using
-frelaxed-template-template-args
) with the following error:The same code compiles on Clang 15. Removing
-frelaxed-template-template-args
makes that code fail in both Clang 15 and 16 and also complains aboutg<A>()
with the same error.The text was updated successfully, but these errors were encountered: