This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
meta::reflect_constant_arraySection: 21.4.3 [meta.define.static] Status: WP Submitter: Tomasz KamiĆski Opened: 2025-10-27 Last modified: 2025-11-11
Priority: Not Prioritized
View all issues with WP status.
Discussion:
Addresses US 120-181 and US 121-18221.4.15 [meta.reflection.array] p10 Clarify ei type. It is not clear what ei is when proxy references are involved.
21.4.15 [meta.reflection.array] Clarify copy-initialization vs. direct-initialization use
The initialization of P uses copy-initialization but the Mandates clause uses direct-initialization.
Previous resolution [SUPERSEDED]:
This wording is relative to N5014.
Modify 21.4.3 [meta.define.static] as indicated:
template<ranges::input_range R> consteval info reflect_constant_array(R&& r);-8- Let
Tberanges::range_value_t<R>.-9- Mandates:
Tis a structural type (13.2 [temp.param]),is_constructible_v<T, ranges::range_reference_t<R>>istrue, andis_copy_constructible_v<T>istrueTsatisfiescopy_constructible.-10- Let
Vbe the pack of values of type info of the same size asr, where the ith element isreflect_constant(, whereeistatic_cast<T>(*iti))eiiti is an iterator to the ith element ofr.[…]
[Kona 2025-11-04; approved by LWG. Status changed: New → Immediate.]
[Kona 2025-11-08; Status changed: Immediate → WP.]
Proposed resolution:
This wording is relative to N5014.
Modify 21.4.3 [meta.define.static] as indicated:
template<ranges::input_range R> consteval info reflect_constant_array(R&& r);
-8- Let
Tberanges::range_value_t<R>and ei bestatic_cast<T>(*iti), where iti is an iterator to the ith element ofr.-9- Mandates:
Tis a structural type (13.2 [temp.param]),is_constructible_v<T, ranges::range_reference_t<R>>istrue, andis_copy_constructible_v<T>istrueTsatisfiescopy_constructible.-10- Let
Vbe the pack of values of typeinfoof the same size asr, where the ith element isreflect_constant(ei), where ei is an iterator to the ith element of.r[…]
-13- Throws: Any exception thrown by the evaluation of any ei, or
meta::exceptionunlessif evaluation of anyreflect_constant(would exit via an exceptioneei)is a constant subexpression for every element.eofr