public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61362] New: g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template
@ 2014-05-29 22:00 dgront at chem dot uw.edu.pl
  2014-05-29 22:01 ` [Bug c++/61362] " dgront at chem dot uw.edu.pl
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dgront at chem dot uw.edu.pl @ 2014-05-29 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61362
           Summary: g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile
                    lambda with template
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dgront at chem dot uw.edu.pl

Minimal example of the problem:

#include <functional>

struct Node {
    size_t length;
};

template<typename N>
class C {
public:
  size_t longest = 0;
  std::function<void(const N )> f = [this](N node) {
    if(node->length > this->longest) this->longest = node->length;
  };
};

int main() {

  Node n;
  n.length = 5;
  C<Node*> c;
  c.f(&n);
}


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

end of thread, other threads:[~2015-10-12 10:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29 22:00 [Bug c++/61362] New: g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template dgront at chem dot uw.edu.pl
2014-05-29 22:01 ` [Bug c++/61362] " dgront at chem dot uw.edu.pl
2014-05-30 15:07 ` daniel.kruegler at googlemail dot com
2014-05-30 15:14 ` daniel.kruegler at googlemail dot com
2014-06-26 17:10 ` paolo.carlini at oracle dot com
2015-03-07 10:46 ` thibaut.lutz at googlemail dot com
2015-10-11 19:32 ` ville.voutilainen at gmail dot com
2015-10-11 19:41 ` ville.voutilainen at gmail dot com
2015-10-12 10:53 ` thibaut.lutz at googlemail dot com

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).