diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C new file mode 100644 index 000000000..36b01785f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C @@ -0,0 +1,30 @@ +// PR c++/46877 +// { dg-options -std=c++0x } + +struct new_allocator +{ + constexpr new_allocator (); +}; + +struct string +{ + constexpr string () + { + } + new_allocator a; +}; + +struct pair +{ + const string first; + constexpr pair () + { + } +}; + +constexpr +new_allocator::new_allocator () +{ +} + +pair p; |