https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67380
Bug ID: 67380
Summary: constexpr: Comparison of pointers to member array
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
struct A {int arr[3] {1, 2, 3};} constexpr a{};
static_assert( a.arr != a.arr+3 );
This fails with 20150813, while it shouldn't. [expr.const]/(2.19) states that
the result shall be specified for an application of an equality operator to be
a constant subexpression; And [expr.eq]/2 clearly makes this specified, such
that the assertion shouldn't fire.