From c5f0472470d0fcd69741ae519bcedc0c10b187c2 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:16:35 +0100 Subject: [PATCH 01/62] LWG4137 Fix Mandates, Preconditions, and Complexity elements of [linalg] algorithms Fixes NB US 172-275 (C++26 CD). --- source/numerics.tex | 61 +++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 9d6bf6e62c..b7501c2e1a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -14233,7 +14233,7 @@ \tcode{\exposid{possibly-multipliable}()} is \tcode{true}, and \item -\tcode{\exposid{possibly-addable}()} +\tcode{\exposid{possibly-addable}()} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} @@ -14243,12 +14243,12 @@ \item \tcode{\exposid{multipliable}(A,x,y)} is \tcode{true}, and \item -\tcode{\exposid{addable}(x,y,z)} is \tcode{true} for those overloads that take a \tcode{z} parameter. +\tcode{\exposid{addable}(y,y,z)} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} \pnum \complexity -\bigoh{\tcode{x.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{x.extent(0)}}. \indexlibraryglobal{matrix_vector_product}% \begin{itemdecl} @@ -14343,7 +14343,7 @@ \tcode{\exposid{possibly-multipliable}()} is \tcode{true}; and \item -\tcode{\exposid{possibly-addable}()} +\tcode{\exposid{possibly-addable}()} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} @@ -14355,13 +14355,13 @@ \item \tcode{\exposid{multipliable}(A,x,y)} is \tcode{true}, and \item -\tcode{\exposid{addable}(x,y,z)} is \tcode{true} +\tcode{\exposid{addable}(y,y,z)} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} \pnum \complexity -\bigoh{\tcode{x.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{x.extent(0)}}. \indexlibraryglobal{symmetric_matrix_vector_product}% \begin{itemdecl} @@ -14435,7 +14435,7 @@ \tcode{\exposid{possibly-multipliable}()} is \tcode{true}; and \item -\tcode{\exposid{possibly-addable}()} +\tcode{\exposid{possibly-addable}()} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} @@ -14447,12 +14447,12 @@ \item \tcode{\exposid{multipliable}(A, x, y)} is \tcode{true}, and \item -\tcode{\exposid{addable}(x, y, z)} is \tcode{true} for those overloads that take a \tcode{z} parameter. +\tcode{\exposid{addable}(y, y, z)} is \tcode{true} for those overloads that take a \tcode{z} parameter. \end{itemize} \pnum \complexity -\bigoh{\tcode{x.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{x.extent(0)}}. \indexlibraryglobal{hermitian_matrix_vector_product}% \begin{itemdecl} @@ -14571,7 +14571,7 @@ \pnum \complexity -\bigoh{\tcode{x.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{x.extent(0)}}. \end{itemdescr} \indexlibraryglobal{triangular_matrix_vector_product}% @@ -14603,7 +14603,7 @@ \pnum \complexity -\bigoh{\tcode{y.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{y.extent(0)}}. \end{itemdescr} \indexlibraryglobal{triangular_matrix_vector_product}% @@ -14631,7 +14631,7 @@ \pnum \complexity -\bigoh{\tcode{x.extent(0)} \times \tcode{A.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{x.extent(0)}}. \pnum \remarks @@ -15560,32 +15560,19 @@ \item If \tcode{InOutMat} has \tcode{layout_blas_packed} layout, then the layout's \tcode{Triangle} template argument has -the same type as the function's \tcode{Triangle} template argument; -\item -\tcode{\exposid{compatible-static-extents}(0, 1)} -is \tcode{true}; -\item -\tcode{\exposid{compatible-static-extents}(0, 1)} -is \tcode{true}; and +the same type as the function's \tcode{Triangle} template argument; and \item -\tcode{\exposid{compatible-static-extents}(0, 0)} +\tcode{\exposid{possibly-multipliable}()} is \tcode{true}. \end{itemize} \pnum \expects -\begin{itemize} -\item -\tcode{A.extent(0)} equals \tcode{A.extent(1)}, -\item -\tcode{C.extent(0)} equals \tcode{C.extent(1)}, and -\item -\tcode{A.extent(0)} equals \tcode{C.extent(0)}. -\end{itemize} +\tcode{\exposid{multipliable}(A, transposed(A), C)} is \tcode{true}. \pnum \complexity -\bigoh{\tcode{A.extent(0)} \times \tcode{A.extent(1)} \times \tcode{C.extent(0)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{A.extent(1)} \times \tcode{A.extent(0)}}. \indexlibraryglobal{symmetric_matrix_rank_k_update}% \begin{itemdecl} @@ -15676,10 +15663,10 @@ then the layout's \tcode{Triangle} template argument has the same type as the function's \tcode{Triangle} template argument; \item -\tcode{\exposid{possibly-addable}()} +\tcode{\exposid{possibly-multipliable}()} is \tcode{true}; and \item -\tcode{\exposid{compatible-static-extents}(0, 1)} +\tcode{\exposid{possibly-multipliable}()} is \tcode{true}. \end{itemize} @@ -15687,14 +15674,16 @@ \expects \begin{itemize} \item -\tcode{\exposid{addable}(A, B, C)} is \tcode{true}, and +\tcode{\exposid{multipliable}(A, transposed(B), C)} +is \tcode{true}, and \item -\tcode{A.extent(0)} equals \tcode{A.extent(1)}. +\tcode{\exposid{multipliable}(B, transposed(A), C)} +is \tcode{true}. \end{itemize} \pnum \complexity -\bigoh{\tcode{A.extent(0)} \times \tcode{A.extent(1)} \times \tcode{C.extent(0)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{A.extent(1)} \times \tcode{B.extent(0)}}. \indexlibraryglobal{symmetric_matrix_rank_2k_update}% \begin{itemdecl} @@ -15793,7 +15782,7 @@ \pnum \complexity -\bigoh{\tcode{A.extent(0)} \times \tcode{X.extent(1)} \times \tcode{X.extent(1)}}. +\bigoh{\tcode{A.extent(0)} \times \tcode{B.extent(1)} \times \tcode{B.extent(1)}}. \end{itemdescr} \pnum @@ -16007,7 +15996,7 @@ \pnum \complexity -\bigoh{\tcode{A.extent(0)} \times \tcode{A.extent(1)} \times \tcode{B.extent(1)}}. +\bigoh{\tcode{B.extent(0)} \times \tcode{A.extent(0)} \times \tcode{A.extent(1)}}. \end{itemdescr} \indexlibraryglobal{triangular_matrix_matrix_left_solve}% From 4501cc9d449d176c5b1ef19080f4b112014c3558 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:22:26 +0100 Subject: [PATCH 02/62] LWG4243 as_bytes/as_writable_bytes is broken with span --- source/containers.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 148d3de34e..100765b923 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -20958,6 +20958,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +\tcode{is_volatile_v} is \tcode{false}. + \pnum \effects Equivalent to: \tcode{return R\{reinterpret_cast(s.data()), s.size_bytes()\};} @@ -20974,7 +20978,8 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_const_v} is \tcode{false}. +\tcode{is_const_v} is \tcode{false} and +\tcode{is_volatile_v} is \tcode{false}. \pnum \effects From 3b512649b0db4ebf8607cdfa565798167f7afd50 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:26:53 +0100 Subject: [PATCH 03/62] LWG4315 Insufficient specification of vector_two_norm and matrix_frob_norm Fixes NB US 171-274 (C++26 CD). --- source/numerics.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index b7501c2e1a..ef8139ee31 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -13803,6 +13803,8 @@ \pnum \mandates +\tcode{InVec::value_type} and \tcode{Scalar} are either a floating-point type, or +a specialization of \tcode{complex}. Let \tcode{a} be \tcode{\exposid{abs-if-needed}(declval())}. Then, \tcode{decltype(\linebreak init + a * a} is convertible to \tcode{Scalar}. @@ -13817,9 +13819,7 @@ \pnum \remarks -If \tcode{InVec::value_type}, and \tcode{Scalar} -are all floating-point types or specializations of \tcode{complex}, -and if \tcode{Scalar} has higher precision +If \tcode{Scalar} has higher precision than \tcode{InVec::value_type}, then intermediate terms in the sum use \tcode{Scalar}'s precision or greater. \begin{note} @@ -14009,6 +14009,8 @@ \pnum \mandates +\tcode{InVec::value_type} and \tcode{Scalar} are either a floating-point type, or +a specialization of \tcode{complex}. Let \tcode{a} be \tcode{\exposid{abs-if-needed}(declval())}. Then, \tcode{decltype(\linebreak init + a * a)} @@ -14025,9 +14027,7 @@ \pnum \remarks -If \tcode{InMat::value_type} and \tcode{Scalar} -are all floating-point types or specializations of \tcode{complex}, -and if \tcode{Scalar} has higher precision +If \tcode{Scalar} has higher precision than \tcode{InMat::value_type}, then intermediate terms in the sum use \tcode{Scalar}'s precision or greater. \end{itemdescr} From 95c9720edf34e4c60c313d1ad1686a4f45ac6292 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:28:32 +0100 Subject: [PATCH 04/62] LWG4423 meta::data_member_spec allows negative bit-field widths --- source/meta.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/meta.tex b/source/meta.tex index f0bd37f53d..efb74cc5fd 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -6578,7 +6578,9 @@ \item \tcode{options.alignment} does not contain a value, \item - \tcode{options.no_unique_address} is \tcode{false}, and + \tcode{options.no_unique_address} is \tcode{false}, + \item + $V$ is not negative, and \item if $V$ equals \tcode{0}, then \tcode{options.name} does not contain a value; and From 0061d5eb99493ff244020b5e9b287f67ecb2a23b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:51:52 +0100 Subject: [PATCH 05/62] LWG2991 variant copy constructor missing noexcept(see below) --- source/utilities.tex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index f704f0dae7..89a267bf03 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5678,7 +5678,7 @@ public: // \ref{variant.ctor}, constructors constexpr variant() noexcept(@\seebelow@); - constexpr variant(const variant&); + constexpr variant(const variant&) noexcept(@\seebelow@); constexpr variant(variant&&) noexcept(@\seebelow@); template @@ -5793,7 +5793,7 @@ \indexlibraryctor{variant}% \begin{itemdecl} -constexpr variant(const variant& w); +constexpr variant(const variant& w) noexcept(@\seebelow@); \end{itemdecl} \begin{itemdescr} @@ -5814,6 +5814,10 @@ \tcode{is_copy_constructible_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. If \tcode{is_trivially_copy_constructible_v<$\tcode{T}_i$>} is \tcode{true} for all $i$, this constructor is trivial. +The exception specification is equivalent to the logical AND of +%FIXME: The paper puts the "AND" in math font and I have no idea +%what markup this is supposed to be in the standard. +\tcode{is_nothrow_copy_constructible_v<$\tcode{T}_i$>} for all $i$. \end{itemdescr} \indexlibraryctor{variant}% From 9fb0caac1980a6ac3cafd5a613b0bad29277b2a5 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:55:20 +0100 Subject: [PATCH 06/62] =?UTF-8?q?LWG3090=20What=20is=20=C2=A7[time.duratio?= =?UTF-8?q?n.cons]p4's=20"no=20overflow=20is=20induced=20in=20the=20conver?= =?UTF-8?q?sion"=20intended=20to=20mean=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/time.tex | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/time.tex b/source/time.tex index 67b1b06b47..98139f1ab7 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1351,13 +1351,17 @@ \begin{itemdescr} \pnum \constraints -No overflow is induced in the conversion and -\tcode{treat_as_floating_point_v} is \tcode{true} or both -\tcode{ratio_divide::den} is \tcode{1} and +\tcode{is_convertible_v} is \tcode{true}. +\tcode{ratio_divide} is a valid ratio specialization. +Either: +\begin{itemize} +\item \tcode{treat_as_floating_point_v} is \tcode{true}; or +\item \tcode{ratio_divide::den} is \tcode{1} and \tcode{treat_as_floating_point_v} is \tcode{false}. +\end{itemize} \begin{note} This -requirement prevents implicit truncation error when converting between +requirement prevents implicit truncation errors when converting between integral-based \tcode{duration} types. Such a construction could easily lead to confusion about the value of the \tcode{duration}. \end{note} From aca6910407d1f3199a586c9a72ba4e9e9f5a9500 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:56:57 +0100 Subject: [PATCH 07/62] LWG3627 Inconsistent specifications for std::make_optional overloads --- source/utilities.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 89a267bf03..8735d5940c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5489,8 +5489,8 @@ begins with a type \grammarterm{template-argument}. \pnum -\returns -\tcode{optional>(std::forward(v))}. +\effects +Equivalent to: \tcode{return optional>(std::forward(v));} \end{itemdescr} \indexlibraryglobal{make_optional}% From a1d129a4df74c3fbfe3062e442610418646107f6 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:58:01 +0100 Subject: [PATCH 08/62] LWG4020 extents::index-cast weirdness --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 100765b923..f5886d9726 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -21250,7 +21250,7 @@ \effects \begin{itemize} \item -If \tcode{OtherIndexType} is an integral type other than \tcode{bool}, +If \tcode{remove_cvref_t} is an integral type other than \tcode{bool}, then equivalent to \tcode{return i;}, \item otherwise, equivalent to \tcode{return static_cast(i);}. From 0041fa99625264fd6067219363590c501d205c08 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 14:59:54 +0100 Subject: [PATCH 09/62] LWG4136 Specify behavior of [linalg] Hermitian algorithms on diagonal with nonzero imaginary part Fixes NB US 170-278 (C++26 CD). --- source/numerics.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/numerics.tex b/source/numerics.tex index ef8139ee31..c1cf34e95d 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -11698,6 +11698,9 @@ \tcode{t} applies to accesses done through the parameter preceding \tcode{t} in the parameter list of \tcode{F}. Let \tcode{m} be such an access-modified function parameter. \tcode{F} will only access the triangle of \tcode{m} specified by \tcode{t}. +For accesses of diagonal elements \tcode{m[i, i]}, +\tcode{F} will use the value \tcode{\exposid{real-if-needed}(m[i, i])} +if the name of \tcode{F} starts with \tcode{hermitian}. For accesses \tcode{m[i, j]} outside the triangle specified by \tcode{t}, \tcode{F} will use the value \begin{itemize} From 9b287286e1306804b44799e819a72bf48d61c4fc Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:03:33 +0100 Subject: [PATCH 10/62] LWG4166 concat_view::end() should be more constrained in order to support noncopyable iterators --- source/ranges.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index ce5fa670c0..3bf0febc8d 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -8921,7 +8921,8 @@ Equivalent to: \begin{codeblock} constexpr auto N = sizeof...(Views); -if constexpr (@\libconcept{common_range}@<@\exposid{maybe-const}@<@\exposid{is-const}@, Views...[N - 1]>>) { +if constexpr (@\exposconcept{all-forward}<\exposid{is-const}, Views...>@ && + @\libconcept{common_range}@<@\exposid{maybe-const}@<@\exposid{is-const}@, Views...[N - 1]>>) { return @\exposid{iterator}@<@\exposid{is-const}@>(this, in_place_index, ranges::end(std::get(@\exposid{views_}@))); } else { From 9851211c0ba9bf5d5138fe9ba66778c984808a61 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:04:45 +0100 Subject: [PATCH 11/62] LWG4253 basic_const_iterator should provide iterator_type --- source/iterators.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/iterators.tex b/source/iterators.tex index 9914bd249f..fcb7fc986f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -4246,6 +4246,7 @@ @\exposid{iter-const-rvalue-reference-t}@; public: + using iterator_type = Iterator; using iterator_concept = @\seebelow@; using iterator_category = @\seebelow@; // not always present using value_type = iter_value_t; From 5d98fb24aec9fc973f3a44a70f0a0ec4541c2b62 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:06:56 +0100 Subject: [PATCH 12/62] LWG4255 move_only_function constructor should recognize empty copyable_functions --- source/utilities.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 8735d5940c..651e8dd511 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14265,12 +14265,12 @@ \tcode{*this} has no target object if any of the following hold: \begin{itemize} \item -\tcode{f} is a null function pointer value, or +\tcode{f} is a null function pointer value, \item \tcode{f} is a null member pointer value, or \item \tcode{remove_cvref_t} is a specialization of -the \tcode{move_only_function} class template, +the \tcode{move_only_function} or \tcode{copyable_function} class template, and \tcode{f} has no target object. \end{itemize} Otherwise, \tcode{*this} has a target object of type \tcode{VT} From 7e7ef8497741ce7909865b82b7c7a718d40c3ef7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:08:54 +0100 Subject: [PATCH 13/62] LWG4256 Incorrect constrains for function_ref constructors from nontype_t --- source/utilities.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 651e8dd511..1a645207ca 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15098,7 +15098,7 @@ \pnum \constraints -\tcode{\exposid{is-invocable-using}} is \tcode{true}. +\tcode{\exposid{is-invocable-using}} is \tcode{true}. \pnum \mandates @@ -15132,7 +15132,7 @@ \constraints \begin{itemize} \item \tcode{is_rvalue_reference_v} is \tcode{false}, and -\item \tcode{\exposid{is-invocable-using}} is \tcode{true}. +\item \tcode{\exposid{is-invocable-using}} is \tcode{true}. \end{itemize} \pnum @@ -15163,7 +15163,7 @@ \pnum \constraints -\tcode{\exposid{is-invocable-using}} is \tcode{true}. +\tcode{\exposid{is-invocable-using}} is \tcode{true}. \pnum \mandates From 6d0148fafdf6a550eabe3e48141c97fa3e182c4a Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:10:37 +0100 Subject: [PATCH 14/62] LWG4257 Stream insertion for chrono::local_time should be constrained --- source/time.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/time.tex b/source/time.tex index 98139f1ab7..8fe97ebc04 100644 --- a/source/time.tex +++ b/source/time.tex @@ -3533,6 +3533,9 @@ \end{itemdecl} \begin{itemdescr} +\constraints +\tcode{os << sys_time{lt.time_since_epoch()}} is a valid expression. + \pnum \effects \begin{codeblock} From d06291c0677f88f04adbb304dce0eb1a17661183 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:11:55 +0100 Subject: [PATCH 15/62] LWG4265 std::midpoint should not accept const bool --- source/algorithms.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 5218902777..7fe924e8be 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -13343,7 +13343,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is an arithmetic type other than \tcode{bool}. +\tcode{T} is an arithmetic type other than \cv{}~\tcode{bool}. \pnum \returns From 898f9d817be21ea25227a12fb89367ffe9465da7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:17:19 +0100 Subject: [PATCH 16/62] LWG4266 layout_stride::mapping should treat empty mappings as exhaustive --- source/containers.tex | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index f5886d9726..1a8a1a7078 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -22604,7 +22604,7 @@ constexpr index_type operator()(Indices...) const noexcept; static constexpr bool is_always_unique() noexcept { return true; } - static constexpr bool is_always_exhaustive() noexcept { return false; } + static constexpr bool is_always_exhaustive(); static constexpr bool is_always_strided() noexcept { return true; } static constexpr bool is_unique() noexcept { return true; } @@ -22887,6 +22887,20 @@ \end{codeblock} \end{itemdescr} +\indexlibrarymember{is_always_exhaustive}{layout_stride::mapping}% +\begin{itemdecl} +static constexpr bool is_always_exhaustive() noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +\tcode{true} if \exposid{rank_} is \tcode{0} +or if there is a rank index \tcode{r} of \tcode{extents()} +such that \tcode{extents_type::static_extent(r)} is \tcode{0}, +otherwise \tcode{false}. +\end{itemdescr} + \indexlibrarymember{is_exhaustive}{layout_stride::mapping}% \begin{itemdecl} constexpr bool is_exhaustive() const noexcept; @@ -22897,7 +22911,8 @@ \returns \begin{itemize} \item -\tcode{true} if \exposid{rank_} is 0. +\tcode{true} if \exposid{rank_} or the size of the multidimensional index space +\tcode{m.extents()} is 0. \item Otherwise, \tcode{true} if there is a permutation $P$ of the integers in the range $[0, \exposid{rank_})$ From 02fe17d2dfad425a54141b760f55fc2458de2451 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:22:08 +0100 Subject: [PATCH 17/62] LWG4269 unique_copy passes arguments to its predicate backwards --- source/algorithms.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 7fe924e8be..5dc27b33f9 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -7839,7 +7839,7 @@ \pnum Let \tcode{pred} be \tcode{equal_to\{\}} for the overloads with no parameter \tcode{pred}, and -let $E$ be +let $E(\tcode{i})$ be \begin{itemize} \setlength{\emergencystretch}{1em} \item From 6afbbe9b9b8c72a567a354c0193f9aabc42d51f1 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:30:31 +0100 Subject: [PATCH 18/62] LWG4274 The chrono::hh_mm_ss constructor is ill-formed for unsigned durations --- source/time.tex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/time.tex b/source/time.tex index 8fe97ebc04..2e9e2c975f 100644 --- a/source/time.tex +++ b/source/time.tex @@ -8530,19 +8530,22 @@ \begin{itemize} \item Initializes \tcode{is_neg} with \tcode{d < Duration::zero()}. + Let \exposid{ABS_D} represent + \tcode{-d} if \tcode{is_neg} is \tcode{true} and + \tcode{d} otherwise. \item - Initializes \tcode{h} with \tcode{duration_cast(abs(d))}. + Initializes \tcode{h} with \tcode{duration_cast(\exposid{ABS_D})}. \item Initializes \tcode{m} - with \tcode{duration_cast(abs(d) - hours())}. + with \tcode{duration_cast(\exposid{ABS_D} - hours())}. \item Initializes \tcode{s} - with \tcode{duration_cast(abs(d) - hours() - minutes())}. + with \tcode{duration_cast(\exposid{ABS_D} - hours() - minutes())}. \item If \tcode{treat_as_floating_point_v} is \tcode{true}, - initializes \tcode{ss} with \tcode{abs(d) - hours() - minutes() - seconds()}. + initializes \tcode{ss} with \tcode{\exposid{ABS_D} - hours() - minutes() - seconds()}. Otherwise, initializes \tcode{ss} - with \tcode{duration_cast(abs(d) - hours() - minutes() - seconds())}. + with \tcode{duration_cast(\exposid{ABS_D} - hours() - minutes() - seconds())}. \end{itemize} \begin{note} When \tcode{precision::rep} is integral and From 38461d8e260d89aa2392a33ae2ca62996465a7e5 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:32:25 +0100 Subject: [PATCH 19/62] LWG4275 std::dynamic_extent should also be defined in --- source/containers.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index 1a8a1a7078..805fd2ad66 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -20160,6 +20160,10 @@ The header \libheaderref{mdspan} defines the class template \tcode{mdspan} and other facilities for interacting with these multidimensional views. +\pnum +In addition to being available via inclusion of the \libheaderref{span} header, +\tcode{dynamic_extent} is available when the header \libheaderref{mdspan} is included. + \rSec2[views.contiguous]{Contiguous access} \rSec3[span.syn]{Header \tcode{} synopsis}% From f824e756e2d5a75bb3a58516b78e706c43bc0092 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:32:54 +0100 Subject: [PATCH 20/62] LWG4276 front() and back() are not hardened for zero-length std::arrays --- source/containers.tex | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 805fd2ad66..16149cfb01 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -6335,10 +6335,6 @@ In the case that \tcode{N == 0}, \tcode{begin() == end() ==} unique value. The return value of \tcode{data()} is unspecified. -\pnum -The effect of calling \tcode{front()} or \tcode{back()} for a zero-sized array is -undefined. - \pnum Member function \tcode{swap()} shall have a non-throwing exception specification. From 7a7e75406217ffc8272a18f934010929dfe580ae Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:36:02 +0100 Subject: [PATCH 21/62] LWG4280 simd::partial_load uses undefined identifier T --- source/numerics.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index c1cf34e95d..51c950a6ee 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -18590,11 +18590,12 @@ \end{itemize} \pnum -\effects -Initializes the $i^\text{th}$ element with\\ +\returns +A \tcode{basic_simd} object whose $i^\text{th}$ element is initialized with \tcode{mask[$i$] \&\& $i$ < ranges::size(r) ? static_cast(\brk{}ranges::data(r)[$i$]) : T()} for all $i$ in the range of -\range{0}{V::size()}. +\range{0}{V::size()}, +where \tcode{T} is \tcode{V::value_type}. \pnum \remarks From c34694ebe7289dc9a02a706abb85b6db8ebe28d7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:36:34 +0100 Subject: [PATCH 22/62] Fixup: replace "basic_simd" with "basic_vec" --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 51c950a6ee..61b9698ae9 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -18591,7 +18591,7 @@ \pnum \returns -A \tcode{basic_simd} object whose $i^\text{th}$ element is initialized with +A \tcode{basic_vec} object whose $i^\text{th}$ element is initialized with \tcode{mask[$i$] \&\& $i$ < ranges::size(r) ? static_cast(\brk{}ranges::data(r)[$i$]) : T()} for all $i$ in the range of \range{0}{V::size()}, From a412c29451deac9a2fc2110af3cc317af028a2bc Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:39:40 +0100 Subject: [PATCH 23/62] LWG4286 Some more feature-test macros for fully freestanding features are not marked freestanding --- source/memory.tex | 2 +- source/support.tex | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/memory.tex b/source/memory.tex index 1b455e868b..681032843a 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -85,7 +85,7 @@ template constexpr T* assume_aligned(T* ptr); // freestanding template - bool is_sufficiently_aligned(T* ptr); + bool is_sufficiently_aligned(T* ptr); // freestanding // \ref{obj.lifetime}, explicit lifetime management template diff --git a/source/support.tex b/source/support.tex index c6929d58ff..fd92c551c9 100644 --- a/source/support.tex +++ b/source/support.tex @@ -572,14 +572,14 @@ // also in \libheader{algorithm}, \libheader{ranges}, \libheader{string}, \libheader{deque}, \libheader{list}, \libheader{forward_list}, \libheader{vector} #define @\defnlibxname{cpp_lib_algorithm_iterator_requirements}@ 202207L // also in \libheader{algorithm}, \libheader{numeric}, \libheader{memory} -#define @\defnlibxname{cpp_lib_aligned_accessor}@ 202411L // also in \libheader{mdspan} +#define @\defnlibxname{cpp_lib_aligned_accessor}@ 202411L // freestanding, also in \libheader{mdspan} #define @\defnlibxname{cpp_lib_allocate_at_least}@ 202302L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_allocator_traits_is_always_equal}@ 201411L // freestanding, also in \libheader{memory}, \libheader{scoped_allocator}, \libheader{string}, \libheader{deque}, \libheader{forward_list}, \libheader{list}, // \libheader{vector}, \libheader{map}, \libheader{set}, \libheader{unordered_map}, \libheader{unordered_set} #define @\defnlibxname{cpp_lib_any}@ 201606L // also in \libheader{any} #define @\defnlibxname{cpp_lib_apply}@ 202506L // freestanding, also in \libheader{tuple}, \libheader{type_traits} -#define @\defnlibxname{cpp_lib_array_constexpr}@ 201811L // also in \libheader{iterator}, \libheader{array} +#define @\defnlibxname{cpp_lib_array_constexpr}@ 201811L // freestanding, also in \libheader{iterator}, \libheader{array} #define @\defnlibxname{cpp_lib_as_const}@ 201510L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_associative_heterogeneous_erasure}@ 202110L // also in \libheader{map}, \libheader{set}, \libheader{unordered_map}, \libheader{unordered_set} @@ -612,7 +612,7 @@ // \libheader{string_view} #define @\defnlibxname{cpp_lib_chrono}@ 202306L // also in \libheader{chrono} #define @\defnlibxname{cpp_lib_chrono_udls}@ 201304L // also in \libheader{chrono} -#define @\defnlibxname{cpp_lib_clamp}@ 201603L // also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_clamp}@ 201603L // freestanding, also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_common_reference}@ 202302L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_common_reference_wrapper}@ 202302L // freestanding, also in \libheader{functional} #define @\defnlibxname{cpp_lib_complex_udls}@ 201309L // also in \libheader{complex} @@ -639,7 +639,7 @@ #define @\defnlibxname{cpp_lib_constexpr_map}@ 202502L // also in \libheader{map} #define @\defnlibxname{cpp_lib_constexpr_memory}@ 202506L // freestanding, also in \libheader{memory} #define @\defnlibxname{cpp_lib_constexpr_new}@ 202406L // freestanding, also in \libheader{new} -#define @\defnlibxname{cpp_lib_constexpr_numeric}@ 201911L // also in \libheader{numeric} +#define @\defnlibxname{cpp_lib_constexpr_numeric}@ 201911L // freestanding, also in \libheader{numeric} #define @\defnlibxname{cpp_lib_constexpr_queue}@ 202502L // also in \libheader{queue} #define @\defnlibxname{cpp_lib_constexpr_set}@ 202502L // also in \libheader{set} #define @\defnlibxname{cpp_lib_constexpr_stack}@ 202502L // also in \libheader{stack} @@ -708,8 +708,8 @@ #define @\defnlibxname{cpp_lib_freestanding_utility}@ 202306L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_freestanding_variant}@ 202311L // freestanding, also in \libheader{variant} #define @\defnlibxname{cpp_lib_fstream_native_handle}@ 202306L // also in \libheader{fstream} -#define @\defnlibxname{cpp_lib_function_ref}@ 202306L // also in \libheader{functional} -#define @\defnlibxname{cpp_lib_gcd_lcm}@ 201606L // also in \libheader{numeric} +#define @\defnlibxname{cpp_lib_function_ref}@ 202306L // freestanding, also in \libheader{functional} +#define @\defnlibxname{cpp_lib_gcd_lcm}@ 201606L // freestanding, also in \libheader{numeric} #define @\defnlibxname{cpp_lib_generator}@ 202207L // also in \libheader{generator} #define @\defnlibxname{cpp_lib_generic_associative_lookup}@ 201304L // also in \libheader{map}, \libheader{set} #define @\defnlibxname{cpp_lib_generic_unordered_lookup}@ 201811L @@ -724,7 +724,7 @@ #define @\defnlibxname{cpp_lib_indirect}@ 202502L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_inplace_vector}@ 202406L // also in \libheader{inplace_vector} #define @\defnlibxname{cpp_lib_int_pow2}@ 202002L // freestanding, also in \libheader{bit} -#define @\defnlibxname{cpp_lib_integer_comparison_functions}@ 202002L // also in \libheader{utility} +#define @\defnlibxname{cpp_lib_integer_comparison_functions}@ 202002L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_integer_sequence}@ 201304L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_integral_constant_callable}@ 201304L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_interpolate}@ 201902L // also in \libheader{cmath}, \libheader{numeric} @@ -741,7 +741,7 @@ #define @\defnlibxname{cpp_lib_is_null_pointer}@ 201309L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_pointer_interconvertible}@ 201907L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_scoped_enum}@ 202011L // freestanding, also in \libheader{type_traits} -#define @\defnlibxname{cpp_lib_is_sufficiently_aligned}@ 202411L // also in \libheader{memory} +#define @\defnlibxname{cpp_lib_is_sufficiently_aligned}@ 202411L // freestanding, also in \libheader{memory} #define @\defnlibxname{cpp_lib_is_swappable}@ 201603L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_virtual_base_of}@ 202406L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_within_lifetime}@ 202306L // freestanding, also in \libheader{type_traits} @@ -790,18 +790,18 @@ #define @\defnlibxname{cpp_lib_ranges_chunk}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_chunk_by}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_concat}@ 202403L // freestanding, also in \libheader{ranges} -#define @\defnlibxname{cpp_lib_ranges_contains}@ 202207L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_ranges_enumerate}@ 202302L // also in \libheader{ranges} -#define @\defnlibxname{cpp_lib_ranges_find_last}@ 202207L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_ranges_fold}@ 202207L // also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_ranges_contains}@ 202207L // freestanding, also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_ranges_enumerate}@ 202302L // freestanding, also in \libheader{ranges} +#define @\defnlibxname{cpp_lib_ranges_find_last}@ 202207L // freestanding, also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_ranges_fold}@ 202207L // freestanding, also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_ranges_generate_random}@ 202403L // also in \libheader{random} #define @\defnlibxname{cpp_lib_ranges_indices}@ 202506L // also in \libheader{ranges} -#define @\defnlibxname{cpp_lib_ranges_iota}@ 202202L // also in \libheader{numeric} +#define @\defnlibxname{cpp_lib_ranges_iota}@ 202202L // freestanding, also in \libheader{numeric} #define @\defnlibxname{cpp_lib_ranges_join_with}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_repeat}@ 202207L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_reserve_hint}@ 202502L // also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_slide}@ 202202L // freestanding, also in \libheader{ranges} -#define @\defnlibxname{cpp_lib_ranges_starts_ends_with}@ 202106L // also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_ranges_starts_ends_with}@ 202106L // freestanding, also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_ranges_stride}@ 202207L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_to_container}@ 202202L // freestanding, also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_to_input}@ 202502L // freestanding, also in \libheader{ranges} @@ -816,9 +816,9 @@ #define @\defnlibxname{cpp_lib_remove_cvref}@ 201711L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_result_of_sfinae}@ 201210L // freestanding, also in \libheader{functional}, \libheader{type_traits} -#define @\defnlibxname{cpp_lib_robust_nonmodifying_seq_ops}@ 201304L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_sample}@ 201603L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_saturation_arithmetic}@ 202311L // also in \libheader{numeric} +#define @\defnlibxname{cpp_lib_robust_nonmodifying_seq_ops}@ 201304L // freestanding, also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_sample}@ 201603L // freestanding, also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_saturation_arithmetic}@ 202311L // freestanding, also in \libheader{numeric} #define @\defnlibxname{cpp_lib_scoped_lock}@ 201703L // also in \libheader{mutex} #define @\defnlibxname{cpp_lib_semaphore}@ 201907L // also in \libheader{semaphore} #define @\defnlibxname{cpp_lib_senders}@ 202506L // also in \libheader{execution} From a9d3ff23e48ac25d3add4c518efa9a54bcacaaa6 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:40:24 +0100 Subject: [PATCH 24/62] LWG4291 explicit map(const Allocator&) should be constexpr --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 16149cfb01..3da70d51e2 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -11568,7 +11568,7 @@ const Allocator& = Allocator()); constexpr map(const map& x); constexpr map(map&& x); - explicit map(const Allocator&); + constexpr explicit map(const Allocator&); constexpr map(const map&, const type_identity_t&); constexpr map(map&&, const type_identity_t&); constexpr map(initializer_list, const Compare& = Compare(), From 75b92ec46ccce00433b4158010be01801a0bb85b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 15:46:01 +0100 Subject: [PATCH 25/62] LWG4292 Unordered container local iterators should be constexpr iterators --- source/containers.tex | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 3da70d51e2..ea1f48a456 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -13445,7 +13445,8 @@ is additional semantic information. \pnum -The types \tcode{iterator} and \tcode{const_iterator} meet +The types \tcode{iterator}, \tcode{const_iterator}, +\tcode{local_iterator}, and \tcode{const_local_iterator} meet the constexpr iterator requirements\iref{iterator.requirements.general}. \indexlibraryglobal{unordered_map}% @@ -14240,7 +14241,8 @@ there is additional semantic information. \pnum -The types \tcode{iterator} and \tcode{const_iterator} meet +The types \tcode{iterator}, \tcode{const_iterator}, +\tcode{local_iterator}, and \tcode{const_local_iterator} meet the constexpr iterator requirements\iref{iterator.requirements.general}. \indexlibraryglobal{unordered_multimap}% @@ -14730,7 +14732,8 @@ is additional semantic information. \pnum -The types \tcode{iterator} and \tcode{const_iterator} meet +The types \tcode{iterator}, \tcode{const_iterator}, +\tcode{local_iterator}, and \tcode{const_local_iterator} meet the constexpr iterator requirements\iref{iterator.requirements.general}. \indexlibraryglobal{unordered_set}% @@ -15150,7 +15153,8 @@ is additional semantic information. \pnum -The types \tcode{iterator} and \tcode{const_iterator} meet +The types \tcode{iterator}, \tcode{const_iterator}, +\tcode{local_iterator}, and \tcode{const_local_iterator} meet the constexpr iterator requirements\iref{iterator.requirements.general}. \indexlibraryglobal{unordered_multiset}% From 5fc285f53eda379ef9f90928e5fffc4a8c510cdd Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:30:51 +0100 Subject: [PATCH 26/62] LWG4293 span::subspan/first/last chooses wrong constructor when T is const-qualified bool --- source/containers.tex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index ea1f48a456..8a576f3d90 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -20647,7 +20647,7 @@ \pnum \effects -Equivalent to: \tcode{return R\{data(), Count\};} +Equivalent to: \tcode{return R(data(), Count);} where \tcode{R} is the return type. \end{itemdescr} @@ -20667,7 +20667,7 @@ \pnum \effects -Equivalent to: \tcode{return R\{data() + (size() - Count), Count\};} +Equivalent to: \tcode{return R(data() + (size() - Count), Count);} where \tcode{R} is the return type. \end{itemdescr} @@ -20722,7 +20722,8 @@ \pnum \effects -Equivalent to: \tcode{return \{data(), count\};} +Equivalent to: \tcode{return R(data(), count);} +where \tcode{R} is the return type. \end{itemdescr} \indexlibrarymember{span}{last}% @@ -20737,7 +20738,8 @@ \pnum \effects -Equivalent to: \tcode{return \{data() + (size() - count), count\};} +Equivalent to: \tcode{return R(data() + (size() - count), count);} +where \tcode{R} is the return type. \end{itemdescr} \indexlibrarymember{span}{subspan}% @@ -20758,8 +20760,9 @@ \effects Equivalent to: \begin{codeblock} -return {data() + offset, count == dynamic_extent ? size() - offset : count}; +return R(data() + offset, count == dynamic_extent ? size() - offset : count); \end{codeblock} +where \tcode{R} is the return type. \end{itemdescr} \rSec4[span.obs]{Observers} From b7664e34f5bd2e394ff01cad673d324e7df252d7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:32:50 +0100 Subject: [PATCH 27/62] LWG4294 bitset(const CharT*) constructor needs to be constrained --- source/utilities.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/utilities.tex b/source/utilities.tex index 1a645207ca..302cc77c06 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -10633,6 +10633,15 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +\begin{itemize} +\item \tcode{is_array_v} is \tcode{false}, +\item \tcode{is_trivially_copyable_v} is \tcode{true}, +\item \tcode{is_standard_layout_v} is \tcode{true}, and +\item \tcode{is_trivially_default_constructible_v} is \tcode{true}. +\end{itemize} + \pnum \effects As if by: From ec5459dbb4bad2548a4b5f0d21bf82b56950c6ab Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:38:02 +0100 Subject: [PATCH 28/62] LWG4297 Missing permutable constraint for iterator overloads in Parallel Range Algorithms --- source/algorithms.tex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 5dc27b33f9..b84f25dde2 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -2355,7 +2355,8 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, class T = projected_value_t> - requires @\libconcept{indirect_binary_predicate}@, const T*> + requires @\libconcept{permutable}@ && + @\libconcept{indirect_binary_predicate}@, const T*> subrange remove(Ep&& exec, I first, S last, const T& value, Proj proj = {}); // freestanding-deleted template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @@ -2377,6 +2378,7 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, @\libconcept{indirect_unary_predicate}@> Pred> + requires @\libconcept{permutable}@ subrange remove_if(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @@ -3217,6 +3219,7 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, @\libconcept{indirect_unary_predicate}@> Pred> + requires @\libconcept{permutable}@ subrange partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @@ -7561,7 +7564,8 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, class T = projected_value_t> - requires @\libconcept{indirect_binary_predicate}@, const T*> + requires @\libconcept{permutable}@ && + @\libconcept{indirect_binary_predicate}@, const T*> subrange ranges::remove(Ep&& exec, I first, S last, const T& value, Proj proj = {}); template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @@ -7583,6 +7587,7 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, @\libconcept{indirect_unary_predicate}@> Pred> + requires @\libconcept{permutable}@ subrange ranges::remove_if(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @@ -9696,6 +9701,7 @@ template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@ S, class Proj = identity, @\libconcept{indirect_unary_predicate}@> Pred> + requires @\libconcept{permutable}@ subrange ranges::partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity, @\libconcept{indirect_unary_predicate}@, Proj>> Pred> From 94471307da5d05e57a53aa9f02390bf014d900fa Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:38:57 +0100 Subject: [PATCH 29/62] LWG4299 Missing Mandates: part in optional::transform --- source/utilities.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/utilities.tex b/source/utilities.tex index 302cc77c06..ad298c580c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -4925,6 +4925,7 @@ \pnum \mandates +\tcode{U} is a valid contained type for \tcode{optional}. The declaration \begin{codeblock} U u(invoke(std::forward(f), *@\exposid{val}@)); From d079ee8d75db6911d238d84dc46eca1227e7d686 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:48:41 +0100 Subject: [PATCH 30/62] LWG4301 condition_variable{_any}::wait_{for, until} should take timeout by value --- source/threads.tex | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index db30cf641a..88da34f5f8 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -9556,17 +9556,17 @@ void wait(unique_lock& lock, Predicate pred); template cv_status wait_until(unique_lock& lock, - const chrono::time_point& abs_time); + chrono::time_point abs_time); template bool wait_until(unique_lock& lock, - const chrono::time_point& abs_time, + chrono::time_point abs_time, Predicate pred); template cv_status wait_for(unique_lock& lock, - const chrono::duration& rel_time); + chrono::duration rel_time); template bool wait_for(unique_lock& lock, - const chrono::duration& rel_time, + chrono::duration rel_time, Predicate pred); using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native} @@ -9732,7 +9732,7 @@ \begin{itemdecl} template cv_status wait_until(unique_lock& lock, - const chrono::time_point& abs_time); + chrono::time_point abs_time); \end{itemdecl} \begin{itemdescr} @@ -9794,7 +9794,7 @@ \begin{itemdecl} template cv_status wait_for(unique_lock& lock, - const chrono::duration& rel_time); + chrono::duration rel_time); \end{itemdecl} \begin{itemdescr} @@ -9845,7 +9845,7 @@ \begin{itemdecl} template bool wait_until(unique_lock& lock, - const chrono::time_point& abs_time, + chrono::time_point abs_time, Predicate pred); \end{itemdecl} @@ -9900,7 +9900,7 @@ \begin{itemdecl} template bool wait_for(unique_lock& lock, - const chrono::duration& rel_time, + chrono::duration rel_time, Predicate pred); \end{itemdecl} @@ -9996,24 +9996,24 @@ void wait(Lock& lock, Predicate pred); template - cv_status wait_until(Lock& lock, const chrono::time_point& abs_time); + cv_status wait_until(Lock& lock, chrono::time_point abs_time); template - bool wait_until(Lock& lock, const chrono::time_point& abs_time, + bool wait_until(Lock& lock, chrono::time_point - cv_status wait_for(Lock& lock, const chrono::duration& rel_time); + cv_status wait_for(Lock& lock, chrono::duration rel_time); template - bool wait_for(Lock& lock, const chrono::duration& rel_time, Predicate pred); + bool wait_for(Lock& lock, chrono::duration rel_time, Predicate pred); // \ref{thread.condvarany.intwait}, interruptible waits template bool wait(Lock& lock, stop_token stoken, Predicate pred); template bool wait_until(Lock& lock, stop_token stoken, - const chrono::time_point& abs_time, Predicate pred); + chrono::time_point abs_time, Predicate pred); template bool wait_for(Lock& lock, stop_token stoken, - const chrono::duration& rel_time, Predicate pred); + chrono::duration rel_time, Predicate pred); }; } \end{codeblock} @@ -10138,7 +10138,7 @@ \indexlibrarymember{wait_until}{condition_variable_any}% \begin{itemdecl} template - cv_status wait_until(Lock& lock, const chrono::time_point& abs_time); + cv_status wait_until(Lock& lock, chrono::time_point abs_time); \end{itemdecl} \begin{itemdescr} @@ -10189,7 +10189,7 @@ \indexlibrarymember{wait_for}{condition_variable_any}% \begin{itemdecl} template - cv_status wait_for(Lock& lock, const chrono::duration& rel_time); + cv_status wait_for(Lock& lock, chrono::duration rel_time); \end{itemdecl} \begin{itemdescr} @@ -10227,7 +10227,7 @@ \indexlibrarymember{wait_until}{condition_variable_any}% \begin{itemdecl} template - bool wait_until(Lock& lock, const chrono::time_point& abs_time, Predicate pred); + bool wait_until(Lock& lock, chrono::time_point abs_time, Predicate pred); \end{itemdecl} \begin{itemdescr} @@ -10257,7 +10257,7 @@ \indexlibrarymember{wait_for}{condition_variable_any}% \begin{itemdecl} template - bool wait_for(Lock& lock, const chrono::duration& rel_time, Predicate pred); + bool wait_for(Lock& lock, chrono::duration rel_time, Predicate pred); \end{itemdecl} \begin{itemdescr} @@ -10323,7 +10323,7 @@ \begin{itemdecl} template bool wait_until(Lock& lock, stop_token stoken, - const chrono::time_point& abs_time, Predicate pred); + chrono::time_point abs_time, Predicate pred); \end{itemdecl} \begin{itemdescr} @@ -10376,7 +10376,7 @@ \begin{itemdecl} template bool wait_for(Lock& lock, stop_token stoken, - const chrono::duration& rel_time, Predicate pred); + chrono::duration rel_time, Predicate pred); \end{itemdecl} \begin{itemdescr} From 7b4876c93fc77c6bde44ed83fe2675a6c6c93090 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:50:00 +0100 Subject: [PATCH 31/62] LWG4305 Missing user requirements on type_order template --- source/support.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/support.tex b/source/support.tex index fd92c551c9..125e9c8a13 100644 --- a/source/support.tex +++ b/source/support.tex @@ -5748,6 +5748,10 @@ with a base characteristic of \tcode{inte\-gral_constant}. +\pnum +If an explicit specialization or partial specialization of \tcode{type_order} is declared, +the program is ill-formed. + \pnum \recommended The order should be lexicographical on parameter-type-lists and template argument lists. From a1079e25e5c7a2aaa5c02cba53e8c4ec3930573b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:52:09 +0100 Subject: [PATCH 32/62] LWG4312 Const and value category mismatch for allocator_arg_t/allocator_arg in the description of uses-allocator construction --- source/memory.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/memory.tex b/source/memory.tex index 681032843a..a5a8d28722 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -1326,7 +1326,7 @@ then \tcode{alloc} is ignored. \item Otherwise, if \tcode{T} has a constructor invocable as - \tcode{T(allocator_arg, alloc, args...)} (leading-allocator convention), + \tcode{T(allocator_arg_t\{\}, alloc, args...)} (leading-allocator convention), then uses-allocator construction chooses this constructor form. \item Otherwise, if \tcode{T} has a constructor invocable as From 0236bd3126af5a6749043ec2f3047514f9d377b6 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:53:11 +0100 Subject: [PATCH 33/62] LWG4317 The meaning of "resource" in the Cpp17Destructible requirements is undefined --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 2958545e4a..f484e28445 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1914,7 +1914,7 @@ {p{1in}p{4.15in}} \topline \hdstyle{Expression} & \hdstyle{Post-condition} \\ \capsep -\tcode{a.\~T()} & All resources owned by \tcode{a} are reclaimed, no exception is propagated. \\ \rowsep +\tcode{a.\~T()} & No exception is propagated. \\ \rowsep \multicolumn{2}{|l|}{ \begin{tailnote} Array types and non-object types are not \oldconcept{Destructible}. From 19361bca8e6b0036808bf397e2391aed10ab05e8 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:54:00 +0100 Subject: [PATCH 34/62] LWG4318 Have hive::erase_if reevaluate end() to avoid UB --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 8a576f3d90..e5320cdf87 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -8971,7 +8971,7 @@ Equivalent to: \begin{codeblock} auto original_size = c.size(); -for (auto i = c.begin(), last = c.end(); i != last; ) { +for (auto i = c.begin(); i != c.end(); ) { if (pred(*i)) { i = c.erase(i); } else { From 804cf0d9d1b92755234b96461467ae5cb189e57c Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:54:36 +0100 Subject: [PATCH 35/62] =?UTF-8?q?LWG4328=20Remove=20note=20in=20=C2=A7[exe?= =?UTF-8?q?c.sched]=20regarding=20waiting=20for=20completion=20of=20schedu?= =?UTF-8?q?led=20operations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/exec.tex | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 6e99784a93..31aaf6d20a 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1157,10 +1157,6 @@ A scheduler type's destructor shall not block pending completion of any receivers connected to the sender objects returned from \tcode{schedule}. -\begin{note} -The ability to wait for completion of submitted function objects -can be provided by the associated execution resource of the scheduler. -\end{note} \rSec1[exec.recv]{Receivers} From 7f8d8e331cea793f8875744f3ca6985e0aea4eec Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:55:11 +0100 Subject: [PATCH 36/62] LWG4340 task::promise_type::unhandled_stopped() should be noexcept Fixes NB US 252-387 (C++26 CD). --- source/exec.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 31aaf6d20a..f21fe8ed1a 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7427,7 +7427,7 @@ auto final_suspend() noexcept; void uncaught_exception(); - coroutine_handle<> unhandled_stopped(); + coroutine_handle<> unhandled_stopped() noexcept; void return_void(); // present only if \tcode{is_void_v} is \tcode{true} template @@ -7611,7 +7611,7 @@ \indexlibrarymember{unhandled_stopped}{task::promise_type}% \begin{itemdecl} -coroutine_handle<> unhandled_stopped(); +coroutine_handle<> unhandled_stopped() noexcept; \end{itemdecl} \begin{itemdescr} \pnum From 237a7d6bd96d01d861075b3597e8c73999ca1a6f Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:55:51 +0100 Subject: [PATCH 37/62] LWG4341 Missing rvalue reference qualification for task::connect() Fixes NB US 244-375 (C++26 CD). --- source/exec.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index f21fe8ed1a..bebbe8b1f6 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7201,7 +7201,7 @@ ~task(); template<@\libconcept{receiver}@ Rcvr> - @\exposid{state}@ connect(Rcvr&& rcvr); + @\exposid{state}@ connect(Rcvr&& rcvr) &&; private: coroutine_handle @\exposidnc{handle}@; // \expos @@ -7288,7 +7288,7 @@ \indexlibrarymember{connect}{task}% \begin{itemdecl} template<@\libconcept{receiver}@ Rcvr> - @\exposid{state}@ connect(Rcvr&& recv); + @\exposid{state}@ connect(Rcvr&& recv) &&; \end{itemdecl} \begin{itemdescr} \pnum From 55a1507c8ac80fdb97ce7570ec5780fab47d540c Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:56:48 +0100 Subject: [PATCH 38/62] LWG4342 Missing rvalue reference qualification for task_scheduler::ts-sender::connect() Fixes NB US 237-369 (C++26 CD). --- source/exec.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index bebbe8b1f6..eda43ffd91 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7094,7 +7094,7 @@ using sender_concept = sender_t; template<@\libconcept{receiver}@ Rcvr> - @\exposid{state}@ connect(Rcvr&& rcvr); + @\exposid{state}@ connect(Rcvr&& rcvr) &&; }; } \end{codeblock} @@ -7121,7 +7121,7 @@ \indexlibrarymember{connect}{task_scheduler::\exposid{ts-sender}}% \begin{itemdecl} template<@\libconcept{receiver}@ Rcvr> - @\exposid{state}@ connect(Rcvr&& rcvr); + @\exposid{state}@ connect(Rcvr&& rcvr) &&; \end{itemdecl} \begin{itemdescr} \pnum From 2e12dbae8279857b35133571adc5e4db79a8a441 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:57:35 +0100 Subject: [PATCH 39/62] LWG4343 Missing default template arguments for task Fixes NB US 243-376 (C++26 CD). --- source/exec.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index eda43ffd91..2e03bac2c0 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7179,7 +7179,7 @@ \begin{codeblock} namespace std::execution { - template + template> class @\libglobal{task}@ { // \ref{task.state} template<@\libconcept{receiver}@ Rcvr> From 8a958a9fe2d4d3f9887a10fe1bfca391718b50b9 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 17:58:39 +0100 Subject: [PATCH 40/62] LWG4345 task::promise_type::return_value default template parameter Fixes NB US 251-388 (C++26 CD). --- source/exec.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index 2e03bac2c0..076643b9d2 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7430,7 +7430,7 @@ coroutine_handle<> unhandled_stopped() noexcept; void return_void(); // present only if \tcode{is_void_v} is \tcode{true} - template + template void return_value(V&& value); // present only if \tcode{is_void_v} is \tcode{false} template From 122c91436232816f27b5c968a6c8596ee8c75c5a Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:01:52 +0100 Subject: [PATCH 41/62] LWG4346 task::promise_type::return_void/value lack a specification Fixes NB US 250-389 (C++26 CD). --- source/exec.tex | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/exec.tex b/source/exec.tex index 076643b9d2..01ad458ba5 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7625,6 +7625,26 @@ \tcode{noop_coroutine()}. \end{itemdescr} +\indexlibrarymember{return_void}{task::promise_type}% +\begin{itemdecl} +void return_void(); +\end{itemdecl} +\begin{itemdescr} +\pnum +\effects +Does nothing. +\end{itemdescr} + +\indexlibrarymember{return_value}{task::promise_type}% +\begin{itemdecl} +void return_value(V&& v); +\end{itemdecl} +\begin{itemdescr} +\pnum +\effects +Equivalent to \tcode{\exposid{result}.emplace(std::forward(v))}. +\end{itemdescr} + \indexlibrarymember{get_env}{task::promise_type}% \begin{itemdecl} @\unspec@ get_env() const noexcept; From 14df1b4e9b990ef591fa377086254160a7d0f88f Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:04:25 +0100 Subject: [PATCH 42/62] LWG4349 task is not actually started lazily Fixes NB US 258-381 (C++26 CD). --- source/exec.tex | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 01ad458ba5..bc14ec54b0 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7423,7 +7423,7 @@ task get_return_object() noexcept; - auto initial_suspend() noexcept; + static constexpr suspend_always @\libmember{initial_suspend}{task::promise_type}@() noexcept { return {}; } auto final_suspend() noexcept; void uncaught_exception(); @@ -7509,22 +7509,6 @@ \tcode{coroutine_handle::\brk{}from_promise\brk{}(*this)}. \end{itemdescr} -\indexlibrarymember{initial_suspend}{task::promise_type}% -\begin{itemdecl} -auto initial_suspend() noexcept; -\end{itemdecl} -\begin{itemdescr} -\pnum -\returns -An awaitable object of unspecified type\iref{expr.await} whose -member functions arrange for -\begin{itemize} -\item the calling coroutine to be suspended, -\item the coroutine to be resumed on an execution agent of the -execution resource associated with \tcode{\exposid{SCHED}(*this)}. -\end{itemize} -\end{itemdescr} - \indexlibrarymember{final_suspend}{task::promise_type}% \begin{itemdecl} auto final_suspend() noexcept; From fe45c509a870e9e54832ab64cc23dee1c9cd1758 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:06:26 +0100 Subject: [PATCH 43/62] LWG4351 integral-constant-like needs more remove_cvref_t --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index e5320cdf87..1d7dacb08b 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -20180,7 +20180,7 @@ template concept @\defexposconcept{integral-constant-like}@ = // \expos is_integral_v> && - !is_same_v> && + !is_same_v> && @\libconcept{convertible_to}@ && @\libconcept{equality_comparable_with}@ && bool_constant::value && From 760ddc3248b7e7b08fdf64e7760cec566b1c432b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:11:45 +0100 Subject: [PATCH 44/62] LWG4366 Heterogeneous comparison of expected may be ill-formed --- source/utilities.tex | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index ad298c580c..041aa40ea1 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -9408,7 +9408,9 @@ \pnum \returns -\tcode{x.has_value() \&\& static_cast(*x == v)}. +If \tcode{x.has_value()} is \tcode{true}, +\tcode{*x == v}; +otherwise \tcode{false}. \end{itemdescr} \indexlibrarymember{operator==}{expected}% @@ -9424,7 +9426,9 @@ \pnum \returns -\tcode{!x.has_value() \&\& static_cast(x.error() == e.error())}. +If \tcode{x.has_value()} is \tcode{true}, +\tcode{x.error() == e.error()}; +otherwise \tcode{false}. \end{itemdescr} \rSec2[expected.void]{Partial specialization of \tcode{expected} for \tcode{void} types} @@ -10346,7 +10350,8 @@ \pnum \returns If \tcode{x.has_value()} does not equal \tcode{y.has_value()}, \tcode{false}; -otherwise \tcode{x.has_value() || static_cast(x.error() == y.error())}. +otherwise if \tcode{x.has_value()} is \tcode{true}, \tcode{true}; +otherwise \tcode{x.error() == y.error()}. \end{itemdescr} \indexlibrarymember{operator==}{expected}% @@ -10363,7 +10368,9 @@ \pnum \returns -\tcode{!x.has_value() \&\& static_cast(x.error() == e.error())}. +If \tcode{!x.has_value()} is \tcode{true}, +\tcode{x.error() == e.error()}; +otherwise \tcode{false}. \end{itemdescr} \rSec1[bitset]{Bitsets} From b86875ad5606205efbc3e1e7748bd8c8d71a147b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:17:17 +0100 Subject: [PATCH 45/62] LWG4370 Comparison of optional to T may be ill-formed --- source/utilities.tex | 84 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 041aa40ea1..ba0133035c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5252,7 +5252,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x == v : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x == v; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator==}{optional}% @@ -5269,7 +5274,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v == *x : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x == v; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator"!=}{optional}% @@ -5286,7 +5296,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x != v : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x != v; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator"!=}{optional}% @@ -5303,7 +5318,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v != *x : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x != v; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator<}{optional}% @@ -5320,7 +5340,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x < v : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x < v; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator<}{optional}% @@ -5337,7 +5362,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v < *x : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return v == *x; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator>}{optional}% @@ -5354,7 +5384,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x > v : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x > v; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator>}{optional}% @@ -5371,7 +5406,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v > *x : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return v > *x; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator<=}{optional}% @@ -5388,7 +5428,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x <= v : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x <= v; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator<=}{optional}% @@ -5405,7 +5450,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v <= *x : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return v <= *x; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator>=}{optional}% @@ -5422,7 +5472,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? *x >= v : false;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return *x >= v; +return false; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator>=}{optional}% @@ -5439,7 +5494,12 @@ \pnum \effects -Equivalent to: \tcode{return x.has_value() ? v >= *x : true;} +Equivalent to: +\begin{codeblock} +if (x.has_value()) + return v >= *x; +return true; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator<=>}{optional}% From 2ca745d919a04f2841bb188783193d9465079e1f Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:20:04 +0100 Subject: [PATCH 46/62] LWG4372 Weaken Mandates: for dynamic padding values in padded layouts --- source/containers.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index 1d7dacb08b..16dc5a23b2 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -23084,6 +23084,7 @@ then the size of the multidimensional index space \tcode{Extents()} is representable as a value of type \tcode{index_type}. \item +If \tcode{padding_value} is not equal to \tcode{dynamic_extent}, then \tcode{padding_value} is representable as a value of type \tcode{index_type}. \item If @@ -23710,6 +23711,7 @@ then the size of the multidimensional index space \tcode{Extents()} is representable as a value of type \tcode{index_type}. \item +If \tcode{padding_value} is not equal to \tcode{dynamic_extent}, then \tcode{padding_value} is representable as a value of type \tcode{index_type}. \item If From 72f0eb693d137b1552b9c3d85714a67a967dd8f8 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:20:49 +0100 Subject: [PATCH 47/62] LWG4375 std::simd::bit_ceil should not be noexcept --- source/numerics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 61b9698ae9..1ace887a4a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -16903,7 +16903,7 @@ // \ref{simd.bit}, bit manipulation template<@\exposconcept{simd-vec-type}@ V> constexpr V byteswap(const V& v) noexcept; - template<@\exposconcept{simd-vec-type}@ V> constexpr V bit_ceil(const V& v) noexcept; + template<@\exposconcept{simd-vec-type}@ V> constexpr V bit_ceil(const V& v); template<@\exposconcept{simd-vec-type}@ V> constexpr V bit_floor(const V& v) noexcept; template<@\exposconcept{simd-vec-type}@ V> @@ -19762,7 +19762,7 @@ \indexlibrarymember{bit_ceil}{simd} \begin{itemdecl} -template<@\exposconcept{simd-vec-type}@ V> constexpr V bit_ceil(const V& v) noexcept; +template<@\exposconcept{simd-vec-type}@ V> constexpr V bit_ceil(const V& v); \end{itemdecl} \begin{itemdescr} From 5d9006677d957178e35dde7c7c910dcf2727a06d Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:22:28 +0100 Subject: [PATCH 48/62] LWG4377 Misleading note about lock-free property of std::atomic_ref --- source/threads.tex | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 88da34f5f8..0993114258 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3239,14 +3239,10 @@ \pnum \begin{note} -Hardware could require an object -referenced by an \tcode{atomic_ref} -to have stricter alignment\iref{basic.align} -than other objects of type \tcode{T}. -Further, whether operations on an \tcode{atomic_ref} -are lock-free could depend on the alignment of the referenced object. -For example, lock-free operations on \tcode{std::complex} -could be supported only if aligned to \tcode{2*alignof(double)}. +An implementation can choose to define +\tcode{atomic_ref::required_alignment} +to a value greater than \tcode{alignof(T)} in order to ensure that +operations on all objects of type \tcode{atomic_ref} are lock-free. \end{note} \end{itemdescr} From 262a6128375e64900e248e5393cc1506b7612685 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:39:42 +0100 Subject: [PATCH 49/62] LWG4269 FIXME unique_copy passes arguments to its predicate backwards FIXME MERGE THIS FIXME MERGE THIS WITH PREVIOUS COMMIT FIXME --- source/algorithms.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index b84f25dde2..2879aff784 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -7948,10 +7948,10 @@ \begin{itemize} \setlength{\emergencystretch}{1em} \item - \tcode{bool(pred(*i, *(i - 1)))} + \tcode{bool(pred(*(i - 1), *i))} for the overloads in namespace \tcode{std}; \item - \tcode{bool(invoke(comp, invoke(proj, *i), invoke(proj, *(i - 1))))} + \tcode{bool(invoke(comp, invoke(proj, *(i - 1)), invoke(proj, *i)))} for the overloads in namespace \tcode{ranges}. \end{itemize} From a4e645f8f00fe5ac837ff4b7dfdc018fe3d7d17b Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:49:10 +0100 Subject: [PATCH 50/62] LWG4382 The simd::basic_mask(bool) overload needs to be more constrained --- source/numerics.tex | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 1ace887a4a..cbeb8ba4f5 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -20036,8 +20036,11 @@ constexpr explicit basic_mask(const basic_mask&) noexcept; template constexpr explicit basic_mask(G&& gen); - constexpr basic_mask(const bitset& b) noexcept; - constexpr explicit basic_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; + template<@\libconcept{same_as}@> T> + constexpr basic_mask(const T& b) noexcept; + template<@\libconcept{unsigned_integral}@ T> + requires (!@\libconcept{same_as}@) + constexpr explicit basic_mask(T val) noexcept; // \ref{simd.mask.subscr}, \tcode{basic_mask} subscript operators constexpr value_type operator[](@\exposid{simd-size-type}@) const; @@ -20141,7 +20144,7 @@ \indexlibraryctor{basic_mask} \begin{itemdecl} -constexpr explicit basic_mask(value_type x) noexcept; +constexpr explicit basic_mask(@\libconcept{same_as}@ auto) noexcept; \end{itemdecl} \begin{itemdescr} @@ -20193,7 +20196,8 @@ \indexlibraryctor{basic_mask} \begin{itemdecl} -constexpr basic_mask(const bitset& b) noexcept; +template<@\libconcept{same_as}@> T> + constexpr basic_mask(const T& b) noexcept; \end{itemdecl} \begin{itemdescr} @@ -20205,7 +20209,9 @@ \indexlibraryctor{basic_mask} \begin{itemdecl} -constexpr explicit basic_mask(@\libconcept{unsigned_integral}@ auto val) noexcept; +template<@\libconcept{unsigned_integral}@ T> + requires (!@\libconcept{same_as}@) + constexpr explicit basic_mask(T val) noexcept; \end{itemdecl} \begin{itemdescr} From 18de1949e90a2ca0df99dd972535773908437374 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:52:08 +0100 Subject: [PATCH 51/62] LWG4384 flat_set::erase(iterator) is underconstrained --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 16dc5a23b2..28e7fcf8e4 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -19040,7 +19040,7 @@ constexpr container_type extract() &&; constexpr void replace(container_type&&); - constexpr iterator erase(iterator position); + constexpr iterator erase(iterator position) requires (!@\libconcept{same_as}@); constexpr iterator erase(const_iterator position); constexpr size_type erase(const key_type& x); template constexpr size_type erase(K&& x); @@ -19711,7 +19711,7 @@ constexpr container_type extract() &&; constexpr void replace(container_type&&); - constexpr iterator erase(iterator position); + constexpr iterator erase(iterator position) requires (!@\libconcept{same_as}@); constexpr iterator erase(const_iterator position); constexpr size_type erase(const key_type& x); template constexpr size_type erase(K&& x); From 792f5914a8157a6dd32fed44c4e16eb83f463775 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:55:14 +0100 Subject: [PATCH 52/62] LWG4398 enable_nonlocking_formatter_optimization should be disabled for container adaptors --- source/containers.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index 28e7fcf8e4..000fe8cf93 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -15627,6 +15627,9 @@ template Container> struct formatter, charT>; + template + constexpr bool enable_nonlocking_formatter_optimization> = false; + // \ref{priority.queue}, class template \tcode{priority_queue} template, class Compare = less> @@ -15641,6 +15644,10 @@ // \ref{container.adaptors.format}, formatter specialization for \tcode{priority_queue} template Container, class Compare> struct formatter, charT>; + + template + constexpr bool + enable_nonlocking_formatter_optimization> = false; } \end{codeblock} @@ -16552,6 +16559,9 @@ // \ref{container.adaptors.format}, formatter specialization for \tcode{stack} template Container> struct formatter, charT>; + + template + constexpr bool enable_nonlocking_formatter_optimization> = false; } \end{codeblock} From 3c173c85d15d39c0980346aec45d36bd3b31bce2 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:56:04 +0100 Subject: [PATCH 53/62] LWG4399 enable_nonlocking_formatter_optimization for pair and tuple needs remove_cvref_t --- source/text.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/text.tex b/source/text.tex index abdd2dd2ba..0e89fc5e83 100644 --- a/source/text.tex +++ b/source/text.tex @@ -8784,7 +8784,7 @@ template constexpr bool enable_nonlocking_formatter_optimization<@\placeholder{pair-or-tuple}@> = - (enable_nonlocking_formatter_optimization && ...); + (enable_nonlocking_formatter_optimization> && ...); } \end{codeblock} From a276575ee38c79ced2a325bcd8a2fff51936bf39 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:58:15 +0100 Subject: [PATCH 54/62] LWG4403 simd::basic_vec CTAD misses difference type casting --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index cbeb8ba4f5..813c98f2a5 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -17855,7 +17855,7 @@ \pnum \remarks The deduced type is equivalent to \tcode{vec, -ranges::size(r)>}. +static_cast<\exposid{simd-size-type}>(ranges::size(r))>}. \end{itemdescr} \indexlibraryctor{basic_vec} From bc8a0f7527a3f4299ac76b9949f7601b55350c47 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 18:59:12 +0100 Subject: [PATCH 55/62] LWG4407 constexpr-wrapper-like needs remove_cvref_t in simd::basic_vec constructor --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 813c98f2a5..6422a7ba08 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -17716,7 +17716,7 @@ \tcode{value_type} is value-preserving\iref{simd.general}, or \item \tcode{From} satisfies \exposconcept{constexpr-wrapper-like}, - \tcode{remove_const_t} is an arithmetic type, and + \tcode{remove_cvref_t} is an arithmetic type, and \tcode{From::value} is representable by \tcode{value_type}. \end{itemize} \end{itemdescr} From 3d6e18c1b12ac4fcf3179283e8d0957df6ed8995 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:00:21 +0100 Subject: [PATCH 56/62] LWG4412 Fix declaration of zero_element and uninit_element Fixes NB US-174-282 (C++26 CD). --- source/numerics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 6422a7ba08..5eaf7382d1 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -16625,8 +16625,8 @@ const typename basic_vec::mask_type& mask, flags f = {}); // \ref{simd.permute.static}, static permute - static constexpr @\exposid{simd-size-type}@ @\libmember{zero_element}{simd}@ = @\impdefx{value of \tcode{simd::zero_element}}@; - static constexpr @\exposid{simd-size-type}@ @\libmember{uninit_element}{simd}@ = @\impdefx{value of \tcode{simd::uninit_element}}@; + inline constexpr @\exposid{simd-size-type}@ @\libmember{zero_element}{simd}@ = @\impdefx{value of \tcode{simd::zero_element}}@; + inline constexpr @\exposid{simd-size-type}@ @\libmember{uninit_element}{simd}@ = @\impdefx{value of \tcode{simd::uninit_element}}@; template<@\exposid{simd-size-type}@ N = @\seebelow@, @\exposconcept{simd-vec-type}@ V, class IdxMap> constexpr resize_t permute(const V& v, IdxMap&& idxmap); From 9b4c347df20f11b15023fa000f18a972b4f98fc8 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:01:34 +0100 Subject: [PATCH 57/62] LWG4413 Unused/left-over simd::alignment specialization for basic_mask --- source/numerics.tex | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 5eaf7382d1..3706084e17 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -17140,14 +17140,8 @@ \begin{itemdescr} \pnum \tcode{alignment} has a member \tcode{value} if and only if -\begin{itemize} - \item - \tcode{T} is a specialization of \tcode{basic_mask} and \tcode{U} is - \tcode{bool}, or - \item - \tcode{T} is a specialization of \tcode{basic_vec} and \tcode{U} is a - vectorizable type. -\end{itemize} +\tcode{T} is a specialization of \tcode{basic_vec} and +\tcode{U} is a vectorizable type. \pnum If \tcode{value} is present, the type \tcode{alignment} is a From 465b263afda7f4056eaf82b861e96000e1bb0556 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:02:56 +0100 Subject: [PATCH 58/62] LWG4415 task::promise_type::uncaught_exception seems to be misnamed --- source/exec.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index bc14ec54b0..11b43f5847 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7426,7 +7426,7 @@ static constexpr suspend_always @\libmember{initial_suspend}{task::promise_type}@() noexcept { return {}; } auto final_suspend() noexcept; - void uncaught_exception(); + void unhandled_exception(); coroutine_handle<> unhandled_stopped() noexcept; void return_void(); // present only if \tcode{is_void_v} is \tcode{true} @@ -7581,9 +7581,9 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{uncaught_exception}{task::promise_type}% +\indexlibrarymember{unhandled_exception}{task::promise_type}% \begin{itemdecl} -void uncaught_exception(); +void unhandled_exception(); \end{itemdecl} \begin{itemdescr} \pnum From 135a799cd44ce7de7df364910f1ac581b506d4c8 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:03:38 +0100 Subject: [PATCH 59/62] LWG4416 should include --- source/meta.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/meta.tex b/source/meta.tex index efb74cc5fd..71b45afff9 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2910,6 +2910,7 @@ \indexheader{meta}% \begin{codeblock} +#include // see \ref{compare.syn} #include // see \ref{initializer.list.syn} namespace std { From 9fae9f9141cbc16e30184c4ce5b5a80a7e858fbf Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:04:47 +0100 Subject: [PATCH 60/62] LWG4422 meta::access_context should be a consteval-only type --- source/meta.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index 71b45afff9..a3078eb178 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -5111,8 +5111,8 @@ \rSec2[meta.reflection.access.context]{Access control context} \pnum -The \tcode{access_context} class is a non-aggregate type -that represents a namespace, class, or function +The class \tcode{access_context} +represents a namespace, class, or function from which queries pertaining to access rules may be performed, as well as the designating class\iref{class.access.base}, if any. @@ -5138,7 +5138,7 @@ \end{codeblock} \pnum -\tcode{access_context} is a structural type. +\tcode{access_context} is a structural, consteval-only, non-aggregate type. Two values \tcode{ac1} and \tcode{ac2} of type \tcode{access_context} are template-argument-equivalent\iref{temp.type} if \tcode{ac1.scope()} and \tcode{ac2.scope()} From a27684a932236a40eddbb3d8f10ae5efd9d8756a Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:05:31 +0100 Subject: [PATCH 61/62] LWG4425 CTAD function_ref of data member pointer should produce noexcept signature Fixes NB PL-005 (C++26 CD). --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index ba0133035c..61fa81c37b 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15346,7 +15346,7 @@ in which case let \tcode{R} be \tcode{invoke_result_t}, \tcode{A...} be an empty pack, and -\tcode{E} be \tcode{false}, or +\tcode{E} be \tcode{true}, or \item \tcode{F} is of the form \tcode{R(*)(G, A...) noexcept(E)} for a type \tcode{G}. From 39861b82f2ca7f95ac665499de9517478bc072c0 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Fri, 14 Nov 2025 19:08:55 +0100 Subject: [PATCH 62/62] LWG4426 Clarify what meta::reflect_constant_string considers a string literal --- source/meta.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index a3078eb178..340e077d97 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -3401,8 +3401,8 @@ \pnum Let $V$ be the pack of values of type \tcode{CharT} whose elements are the corresponding elements of \tcode{r}, -except that if \tcode{r} refers to a string literal object, -then $V$ does not include the trailing null terminator of \tcode{r}. +except that if \tcode{r} is a reference to a string literal object, +then $V$ does not include the terminating \unicode{0000}{null} character of \tcode{r}. \pnum Let $P$ be the template parameter object\iref{temp.param}