c++: Fix cpp0x/lambda/lambda-nested9.C with C++11

Unfortunately dejagnu doesn't honor #if/#endif, so this test was failing
with -std=c++11:

FAIL: g++.dg/cpp0x/lambda/lambda-nested9.C  -std=c++11  (test for errors, line 37)

Fixed thus.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/lambda/lambda-nested9.C: Adjust dg-error.
This commit is contained in:
Marek Polacek 2021-11-19 14:54:18 -05:00
parent d4943ce939
commit b903e0f3ad
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ int main() {
#if __cpp_init_captures
[j=0] () {
[&] () mutable {
++j; // { dg-error "read-only" }
++j; // { dg-error "read-only" "" { target c++14 } }
};
};
#endif