8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-template11.C
Paolo Carlini 65371a7edd re PR c++/65579 ([C++11] gcc requires definition of a static constexpr member even though it is not odr-used)
/cp
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65579
	* decl2.c (finish_static_data_member_decl): If there's an initializer,
	complete the type and re-apply the quals.

/testsuite
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65579
	* g++.dg/cpp0x/constexpr-template11.C: New.

From-SVN: r254461
2017-11-06 17:45:55 +00:00

17 lines
182 B
C

// PR c++/65579
// { dg-do link { target c++11 } }
template <typename>
struct S {
int i;
};
struct T {
static constexpr S<int> s = { 1 };
};
int main()
{
return T::s.i;
}