[Bug c++/99201] [8/9/10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16581
kretz at kde dot org
gcc-bugzilla@gcc.gnu.org
Tue Feb 23 08:30:58 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99201
--- Comment #5 from Matthias Kretz (Vir) <kretz at kde dot org> ---
I reduced it some more:
template <typename RefF>
auto
make_tester(const RefF& reffun)
{
return [=](auto in) {
auto&& expected = [&](const auto&... vs) {
if constexpr (sizeof(in) > 0)
return [&](auto i) { return reffun(vs[i]...); }(0);
else
return [&](auto i) { return reffun(vs[i]...); }(0);
};
};
}
int main()
{
make_tester([](auto x) { return x; })(0);
return 0;
}
More information about the Gcc-bugs
mailing list