[Bug c++/70139] [5/6 Regression] -fno-ellide-constructor makes static std::regex to throw
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 18 17:03:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70139
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly more reduced:
template<class T, class U>
struct A
{
T a;
U b;
constexpr A () : a (), b () { }
constexpr A (const T &x, const U &y) : a (x), b (y) { }
};
struct B
{
constexpr B (const bool x) : c (x) {}
constexpr bool operator!= (const B x) const { return c != x.c; }
bool c;
};
constexpr static A<B, B*> d[] = { { B (true), nullptr }, { B (false), nullptr }
};
static_assert (d[0].a != d[1].a, "");
More information about the Gcc-bugs
mailing list