[Bug c++/61814] [c++1y] cannot use decltype on captured arg-pack
oakad at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 23 12:23:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61814
Alexander Dubov <oakad at yahoo dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oakad at yahoo dot com
--- Comment #1 from Alexander Dubov <oakad at yahoo dot com> ---
This problem still happens on 4.9.1.
For example, this example works:
int main(int argc, char **argv)
{
int a{5};
float z(0.5);
[&a](float z_) -> void {
decltype(a) b = a;
}(z);
return 0;
}
But this basic modification fails to compile (g++-4.9.1 -std=gnu++14):
int main(int argc, char **argv)
{
int a{5};
float z(0.5);
[&a](auto z_) -> void {
decltype(a) b = a;
}(z);
return 0;
}
More information about the Gcc-bugs
mailing list