This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77523] rejects valid C++14 code with initialized lambda capture


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77523

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-03-17
                 CC|                            |msebor at gcc dot gnu.org,
                   |                            |nathan at acm dot org
     Ever confirmed|0                           |1
      Known to fail|                            |5.4.1, 6.3.0, 7.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed. EDG eccp 4.13 also accepts it.

In addition, with today's top of trunk the instantiation context is missing. 
This is all I see on output:

$ gcc  -Wall -Wextra -Wpedantic -Wrestrict -std=c++1y t.C
t.C: In function ‘void f(T)’:
t.C:3:18: error: cannot capture ‘f<>’ by reference
   auto g = [&a = f <>] () {};
                  ^~~~
$

Bisection points to r244056 as the change that caused the loss of the context. 
CC'ing the author.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]