Issue |
149746
|
Summary |
CTAD fails for a trailing sub-aggregate with a base that is a pack expansion
|
Labels |
new issue
|
Assignees |
|
Reporter |
TubbytheTuba
|
CTAD fails for a trailing sub-aggregate with a base that is a pack expansion. clang (x86-64 clang 20.1.0 and trunk) fails to compile but gcc (x86-64 gcc 15.1) does not. [godbolt link](https://godbolt.org/z/5rEq399hM).
```
#include <iostream>
template <typename T, typename... U>
struct L1
{
T dm1;
struct A1 : U...
{
using U::operator()...;
} a11;
// expected aggregate deduction candidate:
// template <typename T, typename... U>
// L1(T, U...) -> L1<T, U...>
};
int main()
{
auto l11 = L1
{
0,
[](char c) { std::cout << 1 << std::endl; },
[](bool b) { std::cout << 2 << std::endl; }
};
l11.a11('a');
l11.a11(true);
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs