-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Crash with empty parameter pack on variadic concept as return type constraint #47961
Comments
assigned to @mizvekov |
Nevermind about the comment about explicit template args; that has to do with things relating to overloads and conversions in the specific code I was working with that would take a lot more code to demonstrate here and aren't core to the crash at hand. |
This bug was not resolved in time for the 12.0.0 release, so it will have to wait for 12.0.1. |
The behavior has nearly reversed since the 12 release. Now: The lines labeled |
Reduced example, showing some extra problems:
CE Workspace: https://godbolt.org/z/zK7E9nMfb |
Merged: 02dece0 |
mentioned in issue #51489 |
Extended Description
https://godbolt.org/z/6KE9ed
If a constraint on a return type ends up being given zero parameters for its parameter pack, clang blows up with a very confusing crash and no useful diagnostic. In addition, in certain situations if you explicitly specialize the function template before calling it again without explicit template arguments, the second inferred call will compile but only if preceded by the first call with explicit args. Unfortunately I do not have a minimal repro of this case yet but it is the way I initially encountered this bug.
The text was updated successfully, but these errors were encountered: