[Bug c++/85889] lambda expression can capture structured bindings
dangelog at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Feb 1 01:01:37 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889
--- Comment #13 from Giuseppe D'Angelo <dangelog at gmail dot com> ---
Not sure; N4659 says
https://timsong-cpp.github.io/cppwp/n4659/expr.prim.lambda.capture#4
"The identifier in a simple-capture is looked up using the usual rules for
unqualified name lookup; each such lookup shall find an entity"
and then
https://timsong-cpp.github.io/cppwp/n4659/basic#3
"An entity is a value, object, reference, function, enumerator, type, class
member, bit-field, template, template specialization, namespace, or parameter
pack."
... so a structured binding didn't qualify to be captured because it was not an
entity (?)
More information about the Gcc-bugs
mailing list