diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C new file mode 100644 index 0000000..c1d1c37 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C @@ -0,0 +1,17 @@ +// PR c++/49776 +// { dg-do compile { target c++11 } } + +struct s +{ + int i[1]; + + template<class... Types> + constexpr s(Types... args) + : i{args...} // { dg-error "cannot convert" } + { } +}; + +int main() +{ + s test = nullptr; +} |