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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |5.5
            Summary|ICE on invalid code C++14   |[5/6/7 Regression] ICE on
                   |code: in tsubst_decl, at    |invalid code C++14 code: in
                   |cp/pt.c:12447               |tsubst_decl, at
                   |                            |cp/pt.c:12447

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r210017.  Before that it has been rejected:
pr77522.C: In function ‘void f(T)’:
pr77522.C:3:18: error: cannot capture ‘f’ by reference
   auto g = [&a = f] () {};
                  ^
pr77522.C: In instantiation of ‘struct f(T) [with T = int]::<lambda>’:
pr77522.C:3:25:   required from ‘void f(T) [with T = int]’
pr77522.C:8:7:   required from here
pr77522.C:3:18: error: unable to deduce ‘auto’ from ‘f’
pr77522.C:3:18: error: using invalid field ‘f(T)::<lambda()>::a’

Reply via email to