-
- Downloads
c++: Fix up pedwarn for capturing structured bindings in lambdas [PR118719]
As mentioned in the PR, this pedwarni is desirable for the implicit or explicit capturing of structured bindings in C++17, but in the case of init-captures the initializer is just some expression and that can include structured bindings. So, the following patch limits the warning to non-explicit_init_p. 2025-02-04 Jakub Jelinek <jakub@redhat.com> PR c++/118719 * lambda.cc (add_capture): Only pedwarn about capturing structured binding if !explicit_init_p. * g++.dg/cpp1z/decomp63.C: New test.
Loading
Please register or sign in to comment