Commit 1d7dcb0e by Marek Polacek Committed by Marek Polacek

re PR c++/70156 (incorrect "incomplete type" error initializing a static const data member)

	PR c++/70156
	* g++.dg/init/static5.C: New test.

From-SVN: r271192
parent c76ea1b8
2019-05-14 Marek Polacek <polacek@redhat.com>
PR c++/70156
* g++.dg/init/static5.C: New test.
2019-05-14 Iain Sandoe <iain@sandoe.co.uk>
PR target/82920
......
// PR c++/70156
// { dg-do compile { target c++11 } }
template <int> struct A { int i; };
struct B { int i; };
struct C {
static const A<0> a = { 0 }; // { dg-error ".constexpr. needed for in-class initialization of static data member" }
static const B b = { 1 }; // { dg-error ".constexpr. needed for in-class initialization of static data member" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment