From: Paolo Carlini Date: Wed, 8 Jul 2015 16:08:10 +0000 (+0000) Subject: re PR c++/66421 (G++ fails compilation when assigning tuple created with variadic... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=529b9e5ad7f2f134dbcb7b3549bdb29e689c190c;p=gcc.git re PR c++/66421 (G++ fails compilation when assigning tuple created with variadic template to auto variable) 2015-07-08 Paolo Carlini PR c++/66421 * g++.dg/cpp0x/auto45.C: New. From-SVN: r225563 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b288f0d7490..bff49446c76 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-08 Paolo Carlini + + PR c++/66421 + * g++.dg/cpp0x/auto45.C: New. + 2015-07-08 Vladimir Makarov PR middle-end/66334 diff --git a/gcc/testsuite/g++.dg/cpp0x/auto45.C b/gcc/testsuite/g++.dg/cpp0x/auto45.C new file mode 100644 index 00000000000..bc0d5b85404 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto45.C @@ -0,0 +1,21 @@ +// PR c++/66421 +// { dg-do compile { target c++11 } } + +template struct tuple { }; + +template tuple make_tuple(T&&...) { return {}; } + +template +void foo(Params... params) { + auto t = make_tuple((int)params...); +} + +template +void bar(Params... params) { + tuple t = make_tuple((int)params...); +} + +int main() { + foo(1,2,3); + bar(1,2,3); +}