[Bug c++/68396] New: bug with parameter pack expansion
ryan.burn at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 17 21:57:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68396
Bug ID: 68396
Summary: bug with parameter pack expansion
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ryan.burn at gmail dot com
Target Milestone: ---
This valid code below worked until recently with gcc-6. The latest version of
gcc-6 gives the incorrect error:
bug2.cpp: In function ‘auto make_dimensionality_impl()’:
bug2.cpp:7:17: error: parameter packs not expanded with ‘...’:
return get<2>();
^
bug2.cpp:7:17: note: ‘auto’
////////////////////////////////////////////////////////////////////
template <unsigned> auto get() {
return 2;
};
template <class> class Dimensionality {};
template <int... Indexes> auto make_dimensionality_impl() {
Dimensionality<decltype(get<Indexes>())...>();
return get<2>();
}
int main() { return 0; }
////////////////////////////////////////////////////////////////////
More information about the Gcc-bugs
mailing list