This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63320] New: [5 Regression] bogus âthisâ was not captured for this lambda function error
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Sep 2014 16:41:46 +0000
- Subject: [Bug c++/63320] New: [5 Regression] bogus âthisâ was not captured for this lambda function error
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63320
Bug ID: 63320
Summary: [5 Regression] bogus âthisâ was not captured for this
lambda function error
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
Happened building qt-creator:
markus@x4 coreplugin % cat windowsupport.ii
class A {
static void addWindow();
static void activateWindow(void *);
};
void A::addWindow() {
int* action {};
[action] { activateWindow(action); };
}
markus@x4 coreplugin % g++ -c -std=c++14 windowsupport.ii
windowsupport.ii: In lambda function:
windowsupport.ii:7:35: error: âthisâ was not captured for this lambda function
[action] { activateWindow(action); };
^
(4.9 and 4.8 are fine)
markus@x4 coreplugin % g++ -c -std=c++11 windowsupport.ii
markus@x4 coreplugin % icpc -c -std=c++11 windowsupport.ii
markus@x4 coreplugin % clang++ -w -c -std=c++11 windowsupport.ii
markus@x4 coreplugin %