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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-02-07
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  Clang and ICC like the code but Visual C++ has this to say:

x.cpp(6): warning C4573: the usage of 'A<int>::f' requires the compiler to
capture 'this' but the current default capture mode does not allow it
x.cpp(5): note: while compiling class template member function 'void
A<int>::foo(void)'
x.cpp(11): note: see reference to function template instantiation 'void
A<int>::foo(void)' being compiled
x.cpp(11): note: see reference to class template instantiation 'A<int>' being
compiled

Reply via email to