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;
}

Reply via email to