https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85743
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |9.0
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced to remove library dependencies and make it valid as C++14 too:
template<typename... Ts>
struct Foo {
template<typename T, typename...>
constexpr int boom(int i) const { return 0; }
constexpr void foo(int* data) const {
[this, &data](auto... s) {
int sink[] { boom<Ts>(data[s]) ... };
}(1, 2, 3);
}
};
int main() {
Foo<int, float, char> f;
int a[]{0, 1, 2};
f.foo(a);
}
I don't think it was intentional that r265734 fixed this (Marek?), so we should
probably add the testcase before we close it.