-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Closed
Copy link
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicaterejects-valid
Description
I believe the following C++20 code should compile:
template <class...>
concept True = true;
template <bool>
struct I {
template <template <class...> class F, class... As>
using f = F<As...>;
};
template <template <class...> class F, class... As>
using meval = I<True<As...>>::template f<F, As...>;
template <class F, class... As>
concept P = true;
template <class F, class... As>
requires P<F, As...>
using V = void;
template <class...Ts>
auto f() -> meval<V, int, Ts...> {
}
int main() {
f();
}
Clang 18 and earlier accepts it, as does gcc. With clang-trunk, I get:
<source>:10:29: error: pack expansion used as argument for non-pack parameter of alias template
10 | template <template <class...> class F, class... As>
| ^
1 error generated.
Compiler returned: 1
See repro here: https://godbolt.org/z/c1dG74EPd
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicaterejects-valid
Type
Projects
Status
Done