https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125889
Bug ID: 125889
Summary: [reflection] members_of on a closure is empty
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at hazardy dot de
Target Milestone: ---
As far as I understood I should be able to get the call operator of a closure
type, but members_of is empty.
#include <meta>
using L = decltype([]{});
static_assert(std::meta::members_of(^^L,
std::meta::access_context::unchecked()).size() > 0);
fails with:
error: static assertion failed
static_assert(std::meta::members_of(^^L,
std::meta::access_context::unchecked()).size() > 0);
• the comparison reduces to '(0 > 0)'