8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-array14.C
Jason Merrill 5634394598 re PR c++/66921 (failure to determine size of static constexpr array that is nested within a templated class)
PR c++/66921
	* decl.c (cp_complete_array_type): Allow an initializer that
	already has array type.

From-SVN: r231914
2015-12-22 16:46:50 -05:00

10 lines
203 B
C

// PR c++/66921
// { dg-do compile { target c++11 } }
template<typename T>
struct Holder {
constexpr static const int array[] = { 1, 2, 3 };
enum {F = array[0]};
};
class HI: public Holder<int> {};