bloomberg / clang-p2996

Experimental clang support for WG21 P2996 (Reflection).
https://github.com/bloomberg/clang-p2996/tree/p2996/P2996.md
57 stars 11 forks source link

Promote reflections of references to complete objects to their entities #48

Closed katzdm closed 4 months ago

katzdm commented 5 months ago

Given:

int val = 3;
constexpr auto r = std::meta::reflect_result<int &>(val);

The reflection r should be "promoted" to reflect the entity val. That is, the following should hold:

static_assert(r == ^val);

As of now, it's instead being stored as an RK_const_value whose expression is an lvalue - it should "promote" to an RK_declaration.

katzdm commented 4 months ago

Closed by 43bf5b8.