https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65352
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-03-08 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Or just (untested): --- a/libstdc++-v3/include/std/array +++ b/libstdc++-v3/include/std/array @@ -58,9 +58,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { struct _Type { }; - static constexpr _Tp& + static _Tp& _S_ref(const _Type&, std::size_t) noexcept - { return *static_cast<_Tp*>(nullptr); } + { return reinterpret_cast<_Tp&>(const_cast<_Type&>(t)); } }; /** It's undefined to refer to the element in the zero-size case, so casting to an incompatible reference type shouldn't matter as noone will ever access anything through that reference.