[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-07-09 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC||anass.lasram at gmail dot com

--- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com ---
*** Bug 57565 has been marked as a duplicate of this bug. ***


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-07-08 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
Then let's add the testcase and close the bug.


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-07-08 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

--- Comment #5 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Wed Jul  8 16:08:10 2015
New Revision: 225563

URL: https://gcc.gnu.org/viewcvs?rev=225563root=gccview=rev
Log:
2015-07-08  Paolo Carlini  paolo.carl...@oracle.com

PR c++/66421
* g++.dg/cpp0x/auto45.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto45.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-07-08 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Note that this is already fixed for 5.2.0 too.


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-07-08 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.2

--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com ---
Done.


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-06-07 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

Nathan Sidwell nathan at gcc dot gnu.org changed:

   What|Removed |Added

 CC||nathan at gcc dot gnu.org

--- Comment #2 from Nathan Sidwell nathan at gcc dot gnu.org ---
Appears resolved in version r224163


[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-06-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||rejects-valid
Version|unknown |4.9.2

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org ---
Reduced:

templatetypename... T struct tuple { };

templatetypename... T tupleT... make_tuple(T...) { return {}; }

template typename... Params
void foo(Params... params) {
auto t = make_tuple((int)params...);
}

template typename... Params
void bar(Params... params) {
  tupledecltype((int)params)... t = make_tuple((int)params...);
}

int main() {
foo(1,2,3); // Fails, clang++ compiles it
bar(1,2,3); // Compiles correctly
}


t.cc: In instantiation of ‘void foo(Params ...) [with Params = {int, int,
int}]’:
t.cc:16:14:   required from here
t.cc:7:39: error: conversion from ‘tupleint, int, int’ to non-scalar type
‘tupleint’ requested
 auto t = make_tuple((int)params...);
^

[Bug c++/66421] G++ fails compilation when assigning tuple created with variadic template to auto variable

2015-06-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66421

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-05
 Ever confirmed|0   |1
  Known to fail||4.8.3, 4.9.2, 5.1.0, 6.0