From 8fc9b6bb92ee7a4aba457c1fbcdbc0fbcd418477 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?=
Date: Thu, 27 Nov 2025 11:40:22 +0100
Subject: [PATCH 01/24] New issue: Multidimensional arrays are not supported by
meta::reflect_constant_array and related functions
---
xml/issue4483.xml | 112 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
create mode 100644 xml/issue4483.xml
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
new file mode 100644
index 0000000000..3d04ecf8e1
--- /dev/null
+++ b/xml/issue4483.xml
@@ -0,0 +1,112 @@
+
+
+
+
+Multidimensional arrays are not supported by meta::reflect_constant_array and related functions
+
+Tomasz Kamiński
+27 Nov 2025
+99
+
+
+As any array type (even of structural types) is not considered an structural type, per
+ p12, any invocation of `reflect_constant_array`/`define_static_array`
+with multidimensional array or `span` of arrays is ill formed due Mandate in
+ p8 that requires range value type to be structural.
+
+As a consequence, `constant_of` currently supports only single-dimensional array
+(reflect_constant_arry strips outermost extents), while multi-dimensional array are
+rejected.
+
+Futhremore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
+for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
+object, this function does not support array at all. Futhermore creating an distinct template
+parameter object leads to emission of (otherwise uncessary) additional symbols, and breaks the
+invariant that for all supported object types `&constant_of(o) == define_static_object(o)`.
+We should use `reflect_constant_array` for arrays directly.
+
+The Throws clause of `reflect_constant_array` was updated to include any exception
+thrown by iteration over range.
+
+
+
+
+This wording is relative to ammended with changes from LWG .
+
+
+
+
+Modify as indicated:
+
+
+template<ranges::input_range R>
+ consteval info reflect_constant_array(R&& r);
+
+
+-8- Let TU be ranges::range_value_t<R>
+and T be remove_all_extents_<U>
+ei be static_cast<T>(*iti),
+where iti is an iterator to the ith element of `r`.
+
+-9- Mandates:
+
+- (9.1) — T is a structural type (),
+
is_constructible_v<T, ranges::range_reference_t<R>> is true, and
+
+- (9.2) — T satisfies copy_constructible, and
+- (9.3) — U does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is true.
+
+
+-10- Let V be the pack of values of type `info` of the same size as r,
+where the ith element is
+
+ - (10.1) — reflect_constant_array(*iti) if U is array type,
+ - (10.2) — reflect_constant(static_cast<T>(*iti)
ei) otherwise,
+
+and iti is an iterator to the ith element of `r`.
+-11- Let P be
+
+- (11.1) — If sizeof...(V) > 0 is true, then the template parameter object () of type const `T[sizeof...(V)]`
+
initialized with `{[:V:]...}`, such that constant_of(P[I]) == V...[I] is `true`
+ for all I in range [`0`, `sizeof...(V)`).
+- (11.2) — Otherwise, the template parameter object of type const array<T, 0> initialized with `{}`.
+
+-12- Returns: ^^P.
+-13- Throws: Any of
+
+- (10.1) — exception thrown by incerement and dereference operations on iterator to `r` and comparision of such iterator to sentinel,
+- (10.2) — exception thrown by the evaluation of any argument of reflect_constant
ei, or
+- (10.3) — `meta::exception` if evaluation of any
reflect_constant(ei)evaluation of
+reflect_constant or reflect_constant_array would exit via an exception.
+
+
+[…]
+
+
+template<class T>
+ consteval const remove_cvref_t<T>* define_static_object(T&& t);
+
+
+-15- Effects:Equivalent to:
+
+using U = remove_cvref_t<T>;
+if constexpr (meta::is_class_type(^^U)) {
+ return addressof(meta::extract<const U&>(meta::reflect_constant(std::forward<T>(t))));
+} else if constexpr (meta::is_array_type(^^U)) {
+ return addressof(meta::extract<const U&>(meta::reflect_constant_array(std::forward<T>(t))));
+} else {
+ return define_static_array(span(addressof(t), 1)).data();
+}
+
+
+
+
+
+
+
+
+
+
+
From 942f387e5211c75fa8daea0bf7dc5519f1c0b5a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:00:38 +0100
Subject: [PATCH 02/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 3d04ecf8e1..4a7a6195f3 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -20,7 +20,7 @@ with multidimensional array or `span` of arrays is ill formed due Mandate
(reflect_constant_arry strips outermost extents), while multi-dimensional array are
rejected.
-Futhremore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
+
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
object, this function does not support array at all. Futhermore creating an distinct template
parameter object leads to emission of (otherwise uncessary) additional symbols, and breaks the
From e1fd56a88c89ccadedc7d18942e29ac0d6005712 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:02:37 +0100
Subject: [PATCH 03/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 4a7a6195f3..1b57be8ac1 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -22,7 +22,7 @@ rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
-object, this function does not support array at all. Futhermore creating an distinct template
+object, this function does not support array at all. Furthermore creating an distinct template
parameter object leads to emission of (otherwise uncessary) additional symbols, and breaks the
invariant that for all supported object types `&constant_of(o) == define_static_object(o)`.
We should use `reflect_constant_array` for arrays directly.
From 84e10f5fb1562cf12d28ee111d944553d7375e4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:04:16 +0100
Subject: [PATCH 04/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 1b57be8ac1..e961ce98fc 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -53,7 +53,7 @@ where iti is an iterator to the ith element
-9- Mandates:
- (9.1) — T is a structural type (),
-
is_constructible_v<T, ranges::range_reference_t<R>> is true, and
+ is_constructible_v<T, ranges::range_reference_t<R>> is `true`, and
- (9.2) — T satisfies copy_constructible, and
- (9.3) — U does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is true.
From a9358f8a3d85b5e9db4814cc9391b12deb783b5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:04:53 +0100
Subject: [PATCH 05/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index e961ce98fc..8b5ea544e8 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -24,7 +24,7 @@ rejected.
for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
object, this function does not support array at all. Furthermore creating an distinct template
parameter object leads to emission of (otherwise uncessary) additional symbols, and breaks the
-invariant that for all supported object types `&constant_of(o) == define_static_object(o)`.
+invariant that for all supported object types &constant_of(o) == define_static_object(o).
We should use `reflect_constant_array` for arrays directly.
The Throws clause of `reflect_constant_array` was updated to include any exception
From e259f3b1f36403bd8119a1c86cee1757fc8efd6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:05:25 +0100
Subject: [PATCH 06/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 8b5ea544e8..dc7da9350c 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -23,7 +23,7 @@ rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
object, this function does not support array at all. Furthermore creating an distinct template
-parameter object leads to emission of (otherwise uncessary) additional symbols, and breaks the
+parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
invariant that for all supported object types &constant_of(o) == define_static_object(o).
We should use `reflect_constant_array` for arrays directly.
From 27cfcfa682dadb4dfa59d48e13807cf253dae3e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:06:34 +0100
Subject: [PATCH 07/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index dc7da9350c..1f377d2904 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -55,7 +55,7 @@ where iti is an iterator to the ith element
- (9.1) — T is a structural type (),
is_constructible_v<T, ranges::range_reference_t<R>> is `true`, and
-- (9.2) — T satisfies copy_constructible, and
+- (9.2) — `T` satisfies `copy_constructible`, and
- (9.3) — U does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is true.
From 1507da3c45ffeb02d99191553ebf32f0c3827367 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:07:17 +0100
Subject: [PATCH 08/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 1f377d2904..6b4736a6fd 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -56,7 +56,7 @@ where iti is an iterator to the ith element
is_constructible_v<T, ranges::range_reference_t<R>> is `true`, and
(9.2) — `T` satisfies `copy_constructible`, and
-(9.3) — U does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is true.
+(9.3) — `U` does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
-10- Let V be the pack of values of type `info` of the same size as r,
From 031eb1fb15b2367d7f5344c8ae02b8bf5dc93469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:09:40 +0100
Subject: [PATCH 09/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 6b4736a6fd..6d94aad3b8 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -62,7 +62,7 @@ where iti is an iterator to the ith element
-10- Let V be the pack of values of type `info` of the same size as r,
where the ith element is
- - (10.1) — reflect_constant_array(*iti) if U is array type,
+ - (10.1) — reflect_constant_array(*iti) if U is an array type,
- (10.2) — reflect_constant(static_cast<T>(*iti)
ei) otherwise,
and iti is an iterator to the ith element of `r`.
From 75d9c6513b3466a93007baecd964f620ec2a1a59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:10:18 +0100
Subject: [PATCH 10/24] Update xml/issue4483.xml
Co-authored-by: timsong-cpp
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 6d94aad3b8..341d343560 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -13,7 +13,7 @@
As any array type (even of structural types) is not considered an structural type, per
p12, any invocation of `reflect_constant_array`/`define_static_array`
-with multidimensional array or `span` of arrays is ill formed due Mandate in
+with multidimensional array or `span` of arrays is ill formed due to the Mandates in
p8 that requires range value type to be structural.
As a consequence, `constant_of` currently supports only single-dimensional array
From b411229c727ede549ffb40ea2f76e1989ceead41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:10:26 +0100
Subject: [PATCH 11/24] Update xml/issue4483.xml
Co-authored-by: timsong-cpp
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 341d343560..4974e0fb97 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -17,7 +17,7 @@ with multidimensional array or `span` of arrays is ill formed due to the Mand
p8 that requires range value type to be structural.
As a consequence, `constant_of` currently supports only single-dimensional array
-(reflect_constant_arry strips outermost extents), while multi-dimensional array are
+(reflect_constant_array strips outermost extents), while multi-dimensional array are
rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
From ea949a80cc127818dba641484cc5c8ded86aba8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:11:11 +0100
Subject: [PATCH 12/24] Update xml/issue4483.xml
Co-authored-by: timsong-cpp
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 4974e0fb97..1527194cc4 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -33,7 +33,7 @@ thrown by iteration over range.
-This wording is relative to ammended with changes from LWG .
+This wording is relative to amended with changes from LWG .
From 72817178d64fbf2824a3f306dd2230ee62e5670e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:12:42 +0100
Subject: [PATCH 13/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 1527194cc4..3415806565 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -56,7 +56,7 @@ where iti is an iterator to the ith element
is_constructible_v<T, ranges::range_reference_t<R>> is `true`, and
- (9.2) — `T` satisfies `copy_constructible`, and
-- (9.3) — `U` does not denote array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
+- (9.3) — if `U` does is not an array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
-10- Let V be the pack of values of type `info` of the same size as r,
From 23018b74b12e72d93ca7c2db70a7b6a4f4013796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:15:04 +0100
Subject: [PATCH 14/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 3415806565..701eade5f1 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -22,7 +22,7 @@ rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
-object, this function does not support array at all. Furthermore creating an distinct template
+object, this function does not support array at all. Furthermore creating a distinct template
parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
invariant that for all supported object types &constant_of(o) == define_static_object(o).
We should use `reflect_constant_array` for arrays directly.
From da2030af057c55d0ef729af543ea1100bf2f4b60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:16:20 +0100
Subject: [PATCH 15/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 701eade5f1..936645ada8 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -59,7 +59,7 @@ where iti is an iterator to the ith element
- (9.3) — if `U` does is not an array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
--10- Let V be the pack of values of type `info` of the same size as r,
+
-10- Let `V` be the pack of values of type `info` of the same size as `r`,
where the ith element is
- (10.1) — reflect_constant_array(*iti) if U is an array type,
From 55c6daa31cdad833249841df677679022bdaa340 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:17:38 +0100
Subject: [PATCH 16/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 936645ada8..c264501173 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -68,7 +68,7 @@ where the ith element is
and iti is an iterator to the ith element of `r`.
-11- Let P be
-- (11.1) — If sizeof...(V) > 0 is true, then the template parameter object () of type const `T[sizeof...(V)]`
+
- (11.1) — If sizeof...(V) > 0 is `true`, then the template parameter object () of type const `T[sizeof...(V)]`
initialized with `{[:V:]...}`, such that constant_of(P[I]) == V...[I] is `true`
for all I in range [`0`, `sizeof...(V)`).
- (11.2) — Otherwise, the template parameter object of type const array<T, 0> initialized with `{}`.
From 65ccce406cb16cd68e8a5fd265d239727988f316 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:19:48 +0100
Subject: [PATCH 17/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index c264501173..5bd9ae9f3b 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -76,7 +76,7 @@ where the ith element is
-12- Returns: ^^P.
-13- Throws: Any of
-- (10.1) — exception thrown by incerement and dereference operations on iterator to `r` and comparision of such iterator to sentinel,
+- (10.1) — exception thrown by increment and dereference operations on iterator to `r` and comparison of such iterator to sentinel,
- (10.2) — exception thrown by the evaluation of any argument of reflect_constant
ei, or
- (10.3) — `meta::exception` if evaluation of any
reflect_constant(ei)evaluation of
reflect_constant or reflect_constant_array would exit via an exception.
From cd8b3cf6931995943b420bd9816c5497c062b6a8 Mon Sep 17 00:00:00 2001
From: tomaszkam
Date: Thu, 27 Nov 2025 18:34:10 +0100
Subject: [PATCH 18/24] Apply suggestions from code review
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Daniel Krügler
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 5bd9ae9f3b..410125f50d 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -21,7 +21,7 @@ with multidimensional array or `span` of arrays is ill formed due to the Mand
rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
-for array types. As for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
+for array types. Since for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
object, this function does not support array at all. Furthermore creating a distinct template
parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
invariant that for all supported object types &constant_of(o) == define_static_object(o).
From e0c7eb1034872c148b525772f0a07d3b8cd7c6cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:42:32 +0100
Subject: [PATCH 19/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 410125f50d..f2aa6078cf 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -22,7 +22,7 @@ rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. Since for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
-object, this function does not support array at all. Furthermore creating a distinct template
+object, this function does not support arrays at all. Furthermore creating a distinct template
parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
invariant that for all supported object types &constant_of(o) == define_static_object(o).
We should use `reflect_constant_array` for arrays directly.
From 0e2ef1037cc8281609b21d015cb2c1f362c0308c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:43:51 +0100
Subject: [PATCH 20/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index f2aa6078cf..bb1991555a 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -13,7 +13,7 @@
As any array type (even of structural types) is not considered an structural type, per
p12, any invocation of `reflect_constant_array`/`define_static_array`
-with multidimensional array or `span` of arrays is ill formed due to the Mandates in
+with a multidimensional array or `span` of arrays is ill-formed due to the Mandates in
p8 that requires range value type to be structural.
As a consequence, `constant_of` currently supports only single-dimensional array
From a07a46a5b38b72249fedfe38850616a5cb4b4dbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:44:36 +0100
Subject: [PATCH 21/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index bb1991555a..1c39b0c6f0 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -16,7 +16,7 @@
with a multidimensional array or `span` of arrays is ill-formed due to the Mandates in
p8 that requires range value type to be structural.
-As a consequence, `constant_of` currently supports only single-dimensional array
+
As a consequence, `constant_of` currently supports only single-dimensional arrays
(reflect_constant_array strips outermost extents), while multi-dimensional array are
rejected.
From 3deb1a6d1a97ed6f1796f2303f1419bc6db60b69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?=
Date: Thu, 27 Nov 2025 18:44:56 +0100
Subject: [PATCH 22/24] Update xml/issue4483.xml
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 1c39b0c6f0..771a92fac7 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -17,7 +17,7 @@ with a multidimensional array or `span` of arrays is ill-formed due to the Ma
p8 that requires range value type to be structural.
As a consequence, `constant_of` currently supports only single-dimensional arrays
-(reflect_constant_array strips outermost extents), while multi-dimensional array are
+(reflect_constant_array strips outermost extents), while multi-dimensional arrays are
rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
From 014da7453564a008f3a53c98f4ec8b5605aae3fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?=
Date: Thu, 27 Nov 2025 18:50:28 +0100
Subject: [PATCH 23/24] Additional updates
---
xml/issue4483.xml | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 771a92fac7..722ba33d86 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -22,7 +22,7 @@ rejected.
Furthermore, `define_static_object` currently uses define_static_array(span(addressof(t), 1)).data(),
for array types. Since for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
-object, this function does not support arrays at all. Furthermore creating a distinct template
+object, this function does not support arrays at all. Creating a distinct template
parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
invariant that for all supported object types &constant_of(o) == define_static_object(o).
We should use `reflect_constant_array` for arrays directly.
@@ -52,11 +52,11 @@ where iti is an iterator to the ith element
-9- Mandates:
-- (9.1) — T is a structural type (),
+
- (9.1) — T is a structural type (),
is_constructible_v<T, ranges::range_reference_t<R>> is `true`, and
- (9.2) — `T` satisfies `copy_constructible`, and
-- (9.3) — if `U` does is not an array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
+- (9.3) — if `U` is not an array type, then is_constructible_v<T, ranges::range_reference_t<R>> is `true`.
-10- Let `V` be the pack of values of type `info` of the same size as `r`,
@@ -68,19 +68,18 @@ where the ith element is
and iti is an iterator to the ith element of `r`.
-11- Let P be
-- (11.1) — If sizeof...(V) > 0 is `true`, then the template parameter object () of type const `T[sizeof...(V)]`
+
- (11.1) — If sizeof...(V) > 0 is `true`, then the template parameter object () of type const `T[sizeof...(V)]`
initialized with `{[:V:]...}`, such that constant_of(P[I]) == V...[I] is `true`
for all I in range [`0`, `sizeof...(V)`).
- (11.2) — Otherwise, the template parameter object of type const array<T, 0> initialized with `{}`.
-12- Returns: ^^P.
--13- Throws: Any of
-
-- (10.1) — exception thrown by increment and dereference operations on iterator to `r` and comparison of such iterator to sentinel,
-- (10.2) — exception thrown by the evaluation of any argument of reflect_constant
ei, or
-- (10.3) — `meta::exception` if evaluation of any
reflect_constant(ei)evaluation of
-reflect_constant or reflect_constant_array would exit via an exception.
-
+-13- Throws:
+Any exception thrown by increment and dereference operations on iterator to `r` and comparison of such iterator to sentinel.
+Any exception thrown by the evaluation of any argument of `reflect_constant`.ei, or
+`meta::exception` if evaluation of any reflect_constant(ei)evaluation of
+reflect_constant or reflect_constant_array would exit via an exception.
+
[…]
@@ -95,7 +94,7 @@ using U = remove_cvref_t<T>;
if constexpr (meta::is_class_type(^^U)) {
return addressof(meta::extract<const U&>(meta::reflect_constant(std::forward<T>(t))));
} else if constexpr (meta::is_array_type(^^U)) {
- return addressof(meta::extract<const U&>(meta::reflect_constant_array(std::forward<T>(t))));
+ return addressof(meta::extract<const U&>(meta::reflect_constant_array(std::forward<T>(t))));
} else {
return define_static_array(span(addressof(t), 1)).data();
}
From c149fc624774621424cad07c5c58c96e0d783c5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?=
Date: Thu, 27 Nov 2025 18:53:41 +0100
Subject: [PATCH 24/24] Fixed link
---
xml/issue4483.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/issue4483.xml b/xml/issue4483.xml
index 722ba33d86..5e305821ec 100644
--- a/xml/issue4483.xml
+++ b/xml/issue4483.xml
@@ -14,7 +14,7 @@
As any array type (even of structural types) is not considered an structural type, per
p12, any invocation of `reflect_constant_array`/`define_static_array`
with a multidimensional array or `span` of arrays is ill-formed due to the Mandates in
- p8 that requires range value type to be structural.
+ p8 that requires range value type to be structural.
As a consequence, `constant_of` currently supports only single-dimensional arrays
(reflect_constant_array strips outermost extents), while multi-dimensional arrays are