[Bug c++/65706] [c++14] Pack expansion with variable template incorrectly marked as invalid

2015-08-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65706

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Fixed on the trunk by r225692.

*** This bug has been marked as a duplicate of bug 66336 ***


[Bug c++/65706] [c++14] Pack expansion with variable template incorrectly marked as invalid

2015-07-30 Thread andreash87 at gmx dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65706

Andreas Herrmann andreash87 at gmx dot ch changed:

   What|Removed |Added

 CC||andreash87 at gmx dot ch

--- Comment #2 from Andreas Herrmann andreash87 at gmx dot ch ---
I just stumbled up this problem in GCC 5.2.0. And it seems that Bug 66336 is a
duplicate of this one.

$ g++ --version
g++ (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat bug.cc
template class T, T value_
struct constant {
using type = T;
static constexpr T value = value_;
};

template class Constant
constexpr typename Constant::type get = Constant::value;

template class... Args
void callme(Args...) {}

template class... Args
void works(Args...) {
callme(Args::value...);
}

template class... Args
void fails(Args...) {
callme(getArgs...);  // !!! Parameter pack is not expanded.
}

int main() {
int x = getconstantint, 1;  // The variable template works on its own.
works(constantint, 0{}, constantint, 1{});
fails(constantint, 0{}, constantint, 1{});
}

$ g++ -std=c++14 bug.cc
bug.cc: In function ‘void fails(Args ...)’:
bug.cc:20:21: error: expansion pattern ‘getArgs’ contains no argument packs
 callme(getArgs...);  // !!! Parameter pack is not expanded.

[Bug c++/65706] [c++14] Pack expansion with variable template incorrectly marked as invalid

2015-04-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65706

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-04-09
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org ---
Confirmed.