Title
`constant_of(^^v)` for variable `v` of reference to array/function type produces reflection of pointer constant
Status
new
Section
[meta.reflection.queries]
Submitter
S. B. Tam

Created on 2026-05-18.00:00:00 last changed 3 weeks ago

Messages

Date: 2026-05-18.00:00:00

After CWG 3111, `constant_of` uses `reflect_constant_array` and `reflect_function` for arrays and functions respectively. But since it inspects `type_of(r)` and not `remove_reference(type_of(r))`, variables of reference types will still decay to pointers. It's unclear to me whether this is intended.

History
Date User Action Args
2026-05-18 00:00:00admincreate