-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Clang 19 regression matching constrained template to unconstrained template template parameter #104189
Comments
@llvm/issue-subscribers-clang-frontend Author: Casey Carter (CaseyCarter)
Compiling this program fragment:
```c++
template <template <class, class...> class>
constexpr bool f() { return true; }
template <class> class unconstrained {}; template <class> concept True = true;
repro.cpp:9:17: error: too many template arguments for class template 'constrained'
|
This will be fixed by #96023 That might be too big of a change to backport though. I am looking for which commit introduced the regression. |
That was from the enablement of relaxed-template-template args by default: https://godbolt.org/z/ErKj9M3Ga #96023 is the best fix here. The other problem is that it has also a lot of merge conflicts with other pending patches, and I put it at the top of other patches that are also taking a while to get reviewed. |
@AaronBallman for visibility |
FWIW, this impacts a single MSVCSTL test, and the workaround is to change the |
@mizvekov this is not actually fixed fyi |
Yeah, the patch was reverted a while ago, needs a fixup and reapplying. |
Compiling this program fragment:
with clang 19.1.0-rc2 under
-std=c++20
diagnoses:The
constrained
case should be as well-formed as theunconstrained
case since [temp.arg.template]/3 says the constraints on the argument should be ignored when the template template parameter is not constrained. Note that the release versions of the "big three" (including Clang 18) compile this fragment without issue (https://godbolt.org/z/qYr8orqz7).The text was updated successfully, but these errors were encountered: