From e22a4ce5d64b4c259aea34355779517927de55ba 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 d7b9cfcb3d..5e8de2ab3d 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 bc1a399580bc341afd9bd376787fe5e51bba0dd6 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 dc9719bf3b..c0e85f21a9 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 0581ef8763c9a9b330299c8a372b11f487be2774 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 5e8de2ab3d..f09327eae3 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 cc9c07f84d03b3e1f394306bd472f04f056e56c6 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 7e0b708c5d530c93a4b3d09d216ab9af82e5b8ed 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 a7975824a7..0630eab255 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5682,7 +5682,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 @@ -5797,7 +5797,7 @@ \indexlibraryctor{variant}% \begin{itemdecl} -constexpr variant(const variant& w); +constexpr variant(const variant& w) noexcept(@\seebelow@); \end{itemdecl} \begin{itemdescr} @@ -5818,6 +5818,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 a8168e03248db3737a615cc00ed79f9633524f83 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..9e6fe3790f 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 acc7c9d2604e9f93e971cf44e9baea918bf98b23 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 0630eab255..bed8176f71 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5493,8 +5493,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 84c926c0960d3e81d11f4c4400ff61a7d499bf5e 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 c0e85f21a9..ef79efc86b 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 b3f5b4622e9d29307833a60a4ff9866ebd9f8b2f 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 f09327eae3..f44721d8e3 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 3d184fe8c495f7a3c73bcc09fa7ab95054434ad8 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 c93b855ec9..fe6a374e3e 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 61bc200f3786c96afef89889257d01682cf08b93 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 c971e8329d9edc6fed8eadbe9aa4a9fd3ad14c35 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 bed8176f71..56de039080 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14269,12 +14269,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 b4216f33b27ed59a03f16ce647275c719a14512d 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 56de039080..e5dd4420dd 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15102,7 +15102,7 @@ \pnum \constraints -\tcode{\exposid{is-invocable-using}} is \tcode{true}. +\tcode{\exposid{is-invocable-using}} is \tcode{true}. \pnum \mandates @@ -15136,7 +15136,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 @@ -15167,7 +15167,7 @@ \pnum \constraints -\tcode{\exposid{is-invocable-using}} is \tcode{true}. +\tcode{\exposid{is-invocable-using}} is \tcode{true}. \pnum \mandates From 4229bb853160f0cbcc87341c63633a43abffe7e8 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/time.tex b/source/time.tex index 9e6fe3790f..e767f6720d 100644 --- a/source/time.tex +++ b/source/time.tex @@ -3533,6 +3533,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +\tcode{os << sys_time{lt.time_since_epoch()}} is a valid expression. + \pnum \effects \begin{codeblock} From 4f24fbb9038247260b73c3d29b136030223c21d8 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 e6266d1e8e..b236ff1d3b 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 a4f5fa2054eaacf78d7eb13382e7d137b24acea4 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 ef79efc86b..eee652e4b3 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::stat\-ic_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 84288fef6169b1ea2130fd94632f4b1a438eda78 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 b236ff1d3b..c16c85e22b 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 79f7776e695912a4c773348dd27c8dc267a88cbf 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 e767f6720d..2692bdc662 100644 --- a/source/time.tex +++ b/source/time.tex @@ -8531,19 +8531,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 7769d5c57f642f30ba5358ebe363bef4099c0694 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 eee652e4b3..24117a3a68 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 adf72b3f1600ae4bd482685d765ae99f770e3382 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 24117a3a68..c4e44173b8 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 b11345b868d65ff3b6d79e307a038f29403eef29 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 f44721d8e3..bb323b987d 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 ce0998e10d2055214a73ee858952460d677041cd 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 bb323b987d..4748fa8489 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 7b2d849ca82f3e071fe171809d55d3691fc3477c 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 | 35 ++++++++++++++++++----------------- 2 files changed, 19 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..ddabf31ab4 100644 --- a/source/support.tex +++ b/source/support.tex @@ -572,14 +572,15 @@ // 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 +613,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 +640,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 +709,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 +725,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 +742,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 +791,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 +817,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 0a2d3a296fc931688cbea569ca3948bef1ba8a9e 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 c4e44173b8..bf168b9457 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 68d80a54d538caece32a295af20b5de44e58cbd6 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 bf168b9457..6ce789fce7 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 4344e6ef5b2402851052b9e9a498e1ec1fc4e6e5 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 6ce789fce7..66bde727e5 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 6ca13f3edfd52ddfdaa29e74cdc72ca72db74978 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 e5dd4420dd..82a1ce2a68 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -10637,6 +10637,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 6102746837b00ef3732ddf139f5bca6fde8b345f 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 c16c85e22b..382309f5fb 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 56b9ba219a5902fb48b0e58ab9757a19562f1a44 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 82a1ce2a68..be3aa6ea40 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -4929,6 +4929,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 bfe0882c2d811ccd85345e092abd311dcdf8c615 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 44a5619aee..3f7195edbc 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 ba104564392915d3b37df78fb9e9fa551c6b41c6 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 ddabf31ab4..185f7b99cc 100644 --- a/source/support.tex +++ b/source/support.tex @@ -5749,6 +5749,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 bd7cf13820985f062f7432bcf75057aef49f0e95 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 10ce086b1de75fdeb3a1fb08e1708b65c9bb96d4 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 83deeee4a39962507338ceb0e097db1f2ff04f29 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 66bde727e5..34776afaf1 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 26af3805b7d64fab495247b2864e35e14c0a2e9e 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 ad7f167c3c..2b08a6f2af 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 566716810a1f78a131e43a88b82c4b598a2320b9 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 2b08a6f2af..a5faa07ae6 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 7c6a26eaa78088ab341eacdf13f24d49be3739c0 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 a5faa07ae6..8323769c79 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 922a038e35e2b5725482f75e6edafb3444988ea1 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 8323769c79..f8a72c81f9 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 b3a386741d1cd01bb21283d9215dee0de383f3b4 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 f8a72c81f9..5ca0e46161 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 f3fd09141e00579fffd8475cafeac416fb756107 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 5ca0e46161..f37925ff53 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 ad4de87fc5f13410f9e85fa5e4d379a6242dc212 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 f37925ff53..35ec330448 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 ae0829fadaaaee1918b49b96e7c5349210bb2013 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 35ec330448..8e34bbe0e8 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 044017d4668059b467a2dfa1284d4b565b067c06 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 34776afaf1..46af751a30 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 b7199797af59840de94ca15a5c0bcba720a5eb79 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 be3aa6ea40..8ffad7a805 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -9412,7 +9412,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}% @@ -9428,7 +9430,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} @@ -10350,7 +10354,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}% @@ -10367,7 +10372,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 2d7e3512c17add40fa78aeca7e2e6f7734265c12 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 8ffad7a805..3b87ac66d9 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -5256,7 +5256,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}% @@ -5273,7 +5278,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}% @@ -5290,7 +5300,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}% @@ -5307,7 +5322,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}% @@ -5324,7 +5344,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}% @@ -5341,7 +5366,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}% @@ -5358,7 +5388,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}% @@ -5375,7 +5410,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}% @@ -5392,7 +5432,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}% @@ -5409,7 +5454,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}% @@ -5426,7 +5476,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}% @@ -5443,7 +5498,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 5d46c18431ed4141f3a57a6d5be5cb1f6863f9e7 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 46af751a30..c0a290d964 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 779f819eaa02c2f3059ec7c5c5031e6c9fe09516 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 4748fa8489..164d5f5dc7 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 943988bc2db4d17ed917eea7b8c591ca60042a42 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 3f7195edbc..f4b4f462d0 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 abc4335f019c8b9f124686094bb728b895ac2f53 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 382309f5fb..ef9b723779 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 3eb32d7b224d0f3d5808c3c9c09448abfa427552 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 164d5f5dc7..3c4c12385a 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 2663394505c7832f1cb2c914f407c65c1000c98a 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 c0a290d964..2a6a61123d 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 d607a3b2ae4726648ca868f611b90593061e9aeb 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 2a6a61123d..ab0b8c555b 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 6d2a6246dc102c3ed157a5ebd953d0443c8c4e56 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 f8e942ea4c..2532c0fed6 100644 --- a/source/text.tex +++ b/source/text.tex @@ -8791,7 +8791,7 @@ template constexpr bool enable_nonlocking_formatter_optimization<@\placeholder{pair-or-tuple}@> = - (enable_nonlocking_formatter_optimization && ...); + (enable_nonlocking_formatter_optimization> && ...); } \end{codeblock} From d078e203b4e5dd42ff571fc5c6f568ded04d68ef 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 3c4c12385a..a3b445d64f 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -17854,8 +17854,10 @@ \pnum \remarks -The deduced type is equivalent to \tcode{vec, -ranges::size(r)>}. +The deduced type is equivalent to +\begin{codeblock} +vec, static_cast<@\exposid{simd-size-type}@>(ranges::size(r))> +\end{codeblock} \end{itemdescr} \indexlibraryctor{basic_vec} From d97790ef62fbf387410e11d82120fd4ac59eed0c 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 a3b445d64f..b17863e684 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 f3f531e29bfe420403f6a675d04f31b11df2ed1f 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 b17863e684..97516c5035 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 421348083965a53d30d3e121b1146a85a6e5b770 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 97516c5035..79715cb73b 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 f81af6737cf558b3fb7d87f5d141234f90bd81ae 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 8e34bbe0e8..756736b226 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 bf5563ecd0f784a234fb92c329864f530eea7772 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 01a5886175c2f8a0f05269079b506c7d88b1afbf 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index 71b45afff9..a3962cee90 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,11 +5138,11 @@ \end{codeblock} \pnum -\tcode{access_context} is a structural type. -Two values \tcode{ac1} and \tcode{ac2} of type \tcode{access_context} +\tcode{access_context} is a structural, consteval-only, non-aggregate type. +Two values \tcode{ac1} and \tcode{ac2} of type \linebreak \tcode{access_context} are template-argument-equivalent\iref{temp.type} if \tcode{ac1.scope()} and \tcode{ac2.scope()} -are template-argument-equivalent +are \linebreak template-argument-equivalent and \tcode{ac1.desig\-nating_class()} and \tcode{ac2.desig\-nating_class()} are template-argument-equivalent. From 5dcd7ee2da08870d1a02ecac2c24d84ef8069415 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 3b87ac66d9..ef7cab113a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15350,7 +15350,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 8d09815eeeff6faecc7bbe2b4b6fbb972de6f6b6 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 a3962cee90..de96843660 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}