Files
gcc-reflection/gcc/testsuite/g++.dg/cpp1y/constexpr-array4.C
Jason Merrill c8a66fc97b re PR c++/51489 (constexpr not working consistently)
PR c++/51489

	* constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
	the operands.

From-SVN: r233878
2016-03-01 21:32:44 -05:00

13 lines
195 B
C

// { dg-do compile { target c++14 } }
constexpr bool g()
{
int ar[4] = { 1, 2, 3, 4 };
auto e1 = ar;
auto e4 = ar+3;
return (e4-e1) == 3;
}
#define SA(X) static_assert((X),#X)
SA(g());