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

--- Comment #1 from zuhaitz.zechhub at gmail dot com ---
Clarification of comment 0:

I also included the output for Bug 126040.

The specific output is:

bug_nested_lambda_overflow.cpp: In lambda function:
bug_nested_lambda_overflow.cpp:10:44: error: ‘y’ is not implicitly captured by
a contract assertion [-Wtemplate-body]
   10 |             contract_assert((x * factor) + y + offset > 0);
      |                                            ^
bug_nested_lambda_overflow.cpp:-25147723:35: note: ‘y’ declared here
bug_nested_lambda_overflow.cpp:10:34: error: ‘factor’ is not implicitly
captured by a contract assertion [-Wtemplate-body]
   10 |             contract_assert((x * factor) + y + offset > 0);
      |                                  ^~~~~~
bug_nested_lambda_overflow.cpp:8:34: note: ‘factor’ declared here
    8 |     auto outer_lambda = [&](auto factor) {
      |                             ~~~~~^~~~~~
bug_nested_lambda_overflow.cpp:10:30: error: ‘x’ is not implicitly captured by
a contract assertion [-Wtemplate-body]
   10 |             contract_assert((x * factor) + y + offset > 0);
      |                              ^
bug_nested_lambda_overflow.cpp:-25147723:32: note: ‘x’ declared here

Reply via email to