[Bug c++/64488] [4.9/5.0][c++11] Expand initializer list with lambdas in variadic template. Reject valid code.
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 4 16:10:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64488
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-04
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:
template <int... _is>
struct Expand
{
static void (*const m_arr[sizeof...(_is)])();
};
template <int... _is>
void (*const Expand<_is...>::m_arr[])() = {
[] () { (void)_is; } ...
};
int main()
{
Expand<12,34,56> e;
e.m_arr[0]();
e.m_arr[1]();
e.m_arr[2]();
}
More information about the Gcc-bugs
mailing list