diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C new file mode 100644 index 0000000..aa95264 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C @@ -0,0 +1,14 @@ +// PR c++/49924 +// { dg-do compile { target c++11 } } + +struct A { constexpr A() { } }; + +struct B { + A array[1]; //non-static member array of a literal type w constexpr ctor + constexpr B() : array{} { } // here is the problem +}; + +int main() +{ + constexpr B b{}; // won't compile +} |