[Bug c++/93559] internal compiler error: side-effects element in no-side-effects CONSTRUCTOR
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 3 22:37:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93559
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
struct E { int d[10]; };
struct S {
constexpr int operator()(char) { return 42; }
};
template <typename> struct X {
constexpr static E foo(S s) { return {{s(1)}}; }
};
S s;
static_assert((X<S>::foo(s), 1), "");
More information about the Gcc-bugs
mailing list