[Bug c++/103428] New: Parameter packs not expanded with local struct in lambda
hewillk at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 25 13:58:07 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103428
Bug ID: 103428
Summary: Parameter packs not expanded with local struct in
lambda
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
gcc-10 rejects this well-formed code.
Fortunately, gcc-11.1 accepts it, however, gcc-11.2 rejected it again.
template<class... Ts>
auto f(Ts... args) {
([]() { struct B : decltype(args) { }; }, ...);
};
int main() {
f([]{});
}
https://godbolt.org/z/rYhnKee7M
More information about the Gcc-bugs
mailing list