public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56222] New: Pointer to member in lambda should not require this to be captured
@ 2013-02-06 11:09 boris.bigott at hotmail dot com
  2013-02-06 11:33 ` [Bug c++/56222] " paolo.carlini at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: boris.bigott at hotmail dot com @ 2013-02-06 11:09 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56222

             Bug #: 56222
           Summary: Pointer to member in lambda should not require this to
                    be captured
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: boris.bigott@hotmail.com


In the example below, gcc complains about this not being captures. This happens
whenever a pointer to a member function is requested in a lambda. I tested with
gcc-4.7.2.

struct Test {
    void y() { }
    void x() {
        [](Test &t) { (t.*(&Test::y))(); }(*this);
    }
};  

int main() {  Test().x(); }


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-18  3:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 11:09 [Bug c++/56222] New: Pointer to member in lambda should not require this to be captured boris.bigott at hotmail dot com
2013-02-06 11:33 ` [Bug c++/56222] " paolo.carlini at oracle dot com
2013-02-06 11:42 ` daniel.kruegler at googlemail dot com
2013-02-06 11:56 ` paolo.carlini at oracle dot com
2013-03-05 17:47 ` jason at gcc dot gnu.org
2013-03-08 16:04 ` jason at gcc dot gnu.org
2013-03-08 16:10 ` jason at gcc dot gnu.org
2013-03-17 21:12 ` bruck.michael at googlemail dot com
2013-03-18  3:51 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).