-
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
Constraints of template template parameter not checked for non-dependent arguments despite [temp.names]/8 #121008
Comments
@llvm/issue-subscribers-c-20 Author: Hubert Tong (hubert-reinterpretcast)
https://wg21.link/temp.names#8 specifies that when
> all template-arguments in the simple-template-id are non-dependent ([temp.dep.temp]), the associated constraints ([temp.constr.decl]) of the constrained template shall be satisfied where the "constrained template" may be a template template parameter. Even when template is instantiated, GCC and Clang both fail to emit a diagnostic for a violation of this rule. See also: cplusplus/CWG#658 Online compiler link: https://godbolt.org/z/fTzMnEPG8 SOURCE (
|
@llvm/issue-subscribers-clang-frontend Author: Hubert Tong (hubert-reinterpretcast)
https://wg21.link/temp.names#8 specifies that when
> all template-arguments in the simple-template-id are non-dependent ([temp.dep.temp]), the associated constraints ([temp.constr.decl]) of the constrained template shall be satisfied where the "constrained template" may be a template template parameter. Even when template is instantiated, GCC and Clang both fail to emit a diagnostic for a violation of this rule. See also: cplusplus/CWG#658 Online compiler link: https://godbolt.org/z/fTzMnEPG8 SOURCE (
|
@llvm/issue-subscribers-bug Author: Hubert Tong (hubert-reinterpretcast)
https://wg21.link/temp.names#8 specifies that when
> all template-arguments in the simple-template-id are non-dependent ([temp.dep.temp]), the associated constraints ([temp.constr.decl]) of the constrained template shall be satisfied where the "constrained template" may be a template template parameter. Even when template is instantiated, GCC and Clang both fail to emit a diagnostic for a violation of this rule. See also: cplusplus/CWG#658 Online compiler link: https://godbolt.org/z/fTzMnEPG8 SOURCE (
|
https://wg21.link/temp.names#8 specifies that when
where the "constrained template" may be a template template parameter.
Even when template is instantiated, GCC and Clang both fail to emit a diagnostic for a violation of this rule.
EDG and MSVC both diagnose without needing an instantiation.
See also: cplusplus/CWG#658
Online compiler link: https://godbolt.org/z/fTzMnEPG8
SOURCE (
<stdin>
)COMPILER INVOCATION
ACTUAL COMPILER OUTPUT
(clean compile)
EXPECTED COMPILER OUTPUT
(error)
COMPILER VERSION INFO (
clang++ -v
)The text was updated successfully, but these errors were encountered: