[Bug c++/125889] [reflection] members_of on a closure is empty
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 22 18:31:39 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125889
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:4dc96a3ea00e6876bef3321288343c0abe78bd39
commit r17-1756-g4dc96a3ea00e6876bef3321288343c0abe78bd39
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jun 18 16:54:43 2026 -0400
c++/reflection: include lambda op() in members_of [PR125889]
members_of doesn't append the call operator of a closure type
to ELTS in class_members_of and so the assert in the test doesn't
pass.
PR c++/125889
gcc/cp/ChangeLog:
* reflect.cc (class_members_of): Also append LAMBDA_FUNCTION_P
from the implicitly_declared vector.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/members_of16.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
More information about the Gcc-bugs
mailing list