From 2c6cde04f639de9808db9150fed45f59bd1de312 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:26:18 +0100 Subject: [PATCH 1/7] P3914R0: Re NB US 160-260 (C++26 CD) Fixes NB US 160-260 (C++26 CD). --- source/algorithms.tex | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index b906bc2675..a0ff97d4e1 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -7849,9 +7849,11 @@ \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 + \tcode{false} if \tcode{i} is equal to \tcode{first}; otherwise \item \tcode{bool(pred(*(i - 1), *i))} for the overloads in namespace \tcode{std}; @@ -7869,10 +7871,9 @@ \pnum \effects -For a nonempty range, eliminates all but the first element -from every consecutive group of equivalent elements referred to -by the iterator \tcode{i} in the range \range{first + 1}{last} -for which $E$ is \tcode{true}. +Eliminates all elements referred to +by the iterator \tcode{i} in the range \range{first}{last} +for which $E(\tcode{i})$ is \tcode{true}. \pnum \returns @@ -7952,6 +7953,8 @@ let $E(\tcode{i})$ be \begin{itemize} \setlength{\emergencystretch}{1em} +\item + \tcode{false} if \tcode{i} is equal to \tcode{first}; otherwise \item \tcode{bool(pred(*(i - 1), *i))} for the overloads in namespace \tcode{std}; @@ -7964,13 +7967,13 @@ Let: \begin{itemize} \item - $M$ be the number of iterators \tcode{i} in the range \range{first + 1}{last} + $M$ be the number of iterators \tcode{i} in the range \range{first}{last} for which $E(\tcode{i})$ is \tcode{false}; \item - \tcode{result_last} be \tcode{result + $M$ + 1} + \tcode{result_last} be \tcode{result + $M$} for the overloads with no parameter \tcode{result_last} or \tcode{result_r}; \item - $N$ be $\min(M + 1, \ \tcode{result_last - result})$. + $N$ be $\min(M, \ \tcode{result_last - result})$. \end{itemize} \pnum @@ -8016,9 +8019,9 @@ \pnum \effects -Copies only the first element from $N$ consecutive groups of equivalent elements -referred to by the iterator \tcode{i} in the range \range{first + 1}{last} -for which $E(\tcode{i})$ holds +Copies only the first $N$ elements +referred to by the iterator \tcode{i} in the range \range{first}{last} +for which $E(\tcode{i})$ is \tcode{false} into the range \range{result}{result + $N$}. \pnum @@ -8030,13 +8033,13 @@ \item \tcode{\{last, result + $N$\}} for the overloads in namespace \tcode{ranges}, - if $N$ is equal to $M + 1$. + if $N$ is equal to $M$. \item Otherwise, \tcode{\{j, result_last\}} for the overloads in namespace \tcode{ranges}, - where \tcode{j} is the iterator in \range{first + 1}{last} + where \tcode{j} is the iterator in \range{first}{last} for which $E(\tcode{j})$ is \tcode{false} - and there are exactly $N - 1$ iterators \tcode{i} in \range{first + 1}{j} + and there are exactly $N$ iterators \tcode{i} in \range{first}{j} for which $E(\tcode{i})$ is \tcode{false}. \end{itemize} From 90d31b4d8cb9ed4359e34d0bf9907cd5ad2818cc Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:39:20 +0100 Subject: [PATCH 2/7] P3914R0: Re NB US 209-332 (C++26 CD) Fixes NB US 209-332 (C++26 CD). --- source/exec.tex | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index a2310e32e8..02a7255276 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1359,6 +1359,18 @@ shall denote the same type. \end{itemize} +\pnum +\indexlibraryglobal{\tcode{\placeholder{unspecified-exception}}}% +Various function templates in subclause \ref{exec.snd} +can throw an exception of type \exposid{unspecified-exception}. +Each such exception object is of an unspecified type +such that a \grammarterm{handler} of type \tcode{exception} +matches\iref{except.handle} the exception object +but a \grammarterm{handler} of type \tcode{dependent_sender_error} does not. +\begin{note} +There is no requirement that two such exception objects have the same type. +\end{note} + \rSec2[exec.snd.expos]{Exposition-only entities} \pnum @@ -2064,8 +2076,6 @@ } }; \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \pnum \indexlibraryglobal{\exposid{decay-copyable-result-datums}} @@ -2078,8 +2088,6 @@ }); } \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \begin{itemdecl} template @@ -2982,7 +2990,8 @@ \pnum \throws -An exception of an unspecified type derived from \tcode{exception} if +An exception of type +\tcode{\placeholder{unspecified-exception}}\iref{exec.snd.general} if the expression \tcode{Q()(env)} is ill-formed or has type \tcode{void}, where \tcode{env} is an lvalue subexpression whose type is \tcode{Env}. \end{itemdescr} @@ -3818,8 +3827,6 @@ }; cs.@\exposid{for-each}@(@\exposid{overload-set}@{fn, [](auto){}}); \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \end{itemdescr} \pnum @@ -3968,8 +3975,6 @@ }; cs.@\exposid{for-each}@(@\exposid{overload-set}@(fn, [](auto){})); \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}, and where \tcode{\placeholder{is-valid-let-sender}} is \tcode{true} if and only if all of the following are \tcode{true}: \begin{itemize} @@ -4254,8 +4259,6 @@ }; cs.@\exposid{for-each}@(@\exposid{overload-set}@(fn, [](auto){})); \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \end{itemdescr} \pnum @@ -4473,14 +4476,13 @@ }; (fn.template operator()<@\exposid{child-type}@>(), ...); \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \pnum \throws Any exception thrown as a result of evaluating the \Fundescx{Effects}, or -an exception of an unspecified type -derived from \tcode{exception} when \tcode{CD} is ill-formed. +an exception of type +\tcode{\placeholder{unspecified-\brk{}exception}}\iref{exec.snd.general} +when \tcode{CD} is ill-formed. \end{itemdescr} \pnum @@ -4818,8 +4820,6 @@ }; } \end{codeblock} -where \tcode{\placeholder{unspecified-exception}} is -a type derived from \tcode{exception}. \pnum Let \tcode{sndr} and \tcode{env} be subexpressions From e1fb4d3128b684951873bf613c807be6942c09c5 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:41:38 +0100 Subject: [PATCH 3/7] P3914R0: Re NB US 228-348 (C++26 CD) Fixes NB US 228-348 (C++26 CD). --- source/exec.tex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 02a7255276..0f5b5f1b6e 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -5339,8 +5339,10 @@ \pnum Let \tcode{\placeholder{ssource-t}} be an unspecified type -that models \exposconcept{stoppable-source} and -let \tcode{ssource} be an lvalue of type \tcode{\placeholder{ssource-t}}. +that models \exposconcept{stoppable-source} and \libconcept{default_initializable}, +such that a default-initialized object of type \tcode{\placeholder{ssource-t}} +has an associated stop state. +Let \tcode{ssource} be an lvalue of type \tcode{\placeholder{ssource-t}}. Let \tcode{\placeholder{stoken-t}} be \tcode{decltype(ssource.get_token())}. Let \exposid{future-spawned-sender} be the alias template: From 8d358584a72c1af4fecc3f45850075ed2eaae0c7 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:44:35 +0100 Subject: [PATCH 4/7] P3914R0: Re NB US 263-396 (C++26 CD). Fixes NB US 263-396 (C++26 CD). --- source/exec.tex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 0f5b5f1b6e..e35bc78b95 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -8532,8 +8532,13 @@ \pnum \returns -A non-null shared pointer to an object -that implements the \tcode{parallel_scheduler_backend} interface. +An object \tcode{p}, +such that \tcode{p.get()} points to a \tcode{parallel_scheduler_backend} object +that is a base-class subobject +of some most derived object \tcode{o} within its lifetime. +The lifetime of \tcode{o} does not end +as long as there exists a \tcode{shared_ptr} object \tcode{q} within its lifetime +such that \tcode{q.owner_equal(p)} is \tcode{true}. \pnum \remarks From f6b5f636377a5e60a6001b0216fd00e9349b8797 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:49:32 +0100 Subject: [PATCH 5/7] P3914R0: Re NB US 265-398 and US 266-399 (C++26 CD) Fixes NB US 265-398 and US 266-399 (C++26 CD). --- source/exec.tex | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index e35bc78b95..dd491148a0 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -8569,13 +8569,13 @@ \begin{itemdescr} \pnum \expects -The ends of -the lifetimes of \tcode{*this}, -the object referred to by \tcode{r}, and -any storage referenced by \tcode{s} +The ends +of the lifetime of \tcode{*this}, +of the lifetime of the object referred to by \tcode{r}, and +of the duration of any storage referenced by \tcode{s} all happen after the beginning of the evaluation of -the call to \tcode{set_value}, \tcode{set_error}, or \tcode{set_done} +the call to \tcode{set_value}, \tcode{set_error}, or \tcode{set_stopped} on \tcode{r} (see below). \pnum @@ -8614,12 +8614,14 @@ \begin{itemdescr} \pnum \expects -The ends of -the lifetimes of \tcode{*this}, -the object referred to by \tcode{r}, and -any storage referenced by \tcode{s} +The ends +of the lifetime of \tcode{*this}, +of the lifetime of the object referred to by \tcode{r}, and +of the duration of any storage referenced by \tcode{s} all happen after -the beginning of the evaluation of one of the expressions below. +the beginning of the evaluation of the call to +\tcode{set_value}, \tcode{set_error}, or \tcode{set_stopped} +on \tcode{r} (see below). \pnum \effects @@ -8673,12 +8675,14 @@ \begin{itemdescr} \pnum \expects -The ends of -the lifetimes of \tcode{*this}, -the object referred to by \tcode{r}, and -any storage referenced by \tcode{s} +The ends +of the lifetime of \tcode{*this}, +of the lifetime of the object referred to by \tcode{r}, and +of the duration of any storage referenced by \tcode{s} all happen after -the beginning of the evaluation of one of the expressions below. +the beginning of the evaluation of the call to +\tcode{set_value}, \tcode{set_error}, or \tcode{set_stopped} +on \tcode{r} (see below). \pnum \effects From 23104c039be4938deaea61cefc699af992efee1e Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 18:51:18 +0100 Subject: [PATCH 6/7] P3914R0: Re NB US 112-172 (C++26 CD) Fixes NB US 112-172 (C++26 CD). --- source/meta.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/meta.tex b/source/meta.tex index 565eca7d7a..efb8c2ac60 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -6154,7 +6154,8 @@ and the cv-unqualified types of \tcode{T} and \tcode{U} are the same, \item \tcode{U} is an array type, - \tcode{T} is a pointer type, and + \tcode{T} is a pointer type, + \tcode{remove_extent_t*} and \tcode{T} are similar types, and the value \tcode{r} represents is convertible to \tcode{T}, or \item \tcode{U} is a closure type, From cdbd60ea3d7c3bb5b354aed1e20c9f4f443c4524 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 19:07:17 +0100 Subject: [PATCH 7/7] P3914R0: Re NB US 130-193 (C++26 CD) Fixes NB US 130-193 (C++26 CD). --- source/meta.tex | 65 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index efb8c2ac60..ab064f8f82 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -6870,6 +6870,41 @@ consteval info @\libglobal{unwrap_ref_decay}@(info type); \end{codeblock} +\pnum +For a function or function template $F$ defined in this subclause, +let $C$ be its associated class template. +For the evaluation of a call to $F$, +let $S$ be the specialization of $C$ in terms of which the call is specified. +\begin{itemize} +\item + If + \begin{itemize} + \item + the template arguments of $S$ violate a condition specified + in a \Fundescx{Mandates} element in the specification of $C$; + \item + the call is specified to produce a reflection of a type, + but $S$ would have no member named \tcode{type}; or + \item + the call is specified to return \tcode{$S$::value}, + but that expression would not be a valid converted constant expression of type \tcode{R}, + where \tcode{R} is the return type of $F$; + \end{itemize} + then an exception of type \tcode{meta::exception} is thrown. + \begin{note} + For the first case, $S$ is not instantiated. + \end{note} + \item + Otherwise, if the instantiation of $S$ would result in undefined behavior + due to dependence on an incomplete type\iref{meta.rqmts}, + then the call is not a constant subexpression. + \item + Otherwise, if the template arguments of $S$ do not meet the preconditions of $C$, + then it is unspecified whether the call is a constant subexpression. + If it is, the call produces the result + that would be produced if $C$ had no preconditions. +\end{itemize} + \pnum Each function or function template declared above has the following behavior based on the signature and return type of that function or function template. @@ -6888,20 +6923,20 @@ \tcode{bool meta::\placeholder{UNARY}(info type);\br bool meta::\placeholder{UNARY}_type(info type);} & -\tcode{std::\placeholder{UNARY}_v<$T$>}, +\tcode{std::\placeholder{UNARY}<$T$>::value}, where $T$ is the type or type alias represented by \tcode{type} \\ \rowsep \tcode{bool meta::\placeholder{BINARY}(info t1, info t2);\br bool meta::\placeholder{BINARY}_type(info t1, info t2);} & -\tcode{std::\placeholder{BINARY}_v<$T_1$, $T_2$>}, +\tcode{std::\placeholder{BINARY}<$T_1$, $T_2$>::value}, where $T_1$ and $T_2$ are the types or type aliases represented by \tcode{t1} and \tcode{t2}, respectively \\ \rowsep \tcode{template\br bool meta::\placeholder{VARIADIC}_type(info type, R\&\& args);} & -\tcode{std::\placeholder{VARIADIC}_v<$T$, $U$...>}, +\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::value}, where $T$ is the type or type alias represented by \tcode{type} and \tcode{U...} is the pack of types or type aliases whose elements are represented by the corresponding elements of \tcode{args} @@ -6909,7 +6944,7 @@ \tcode{template\br bool meta::\placeholder{VARIADIC}_type(info t1, info t2, R\&\& args);} & -\tcode{std::\placeholder{VARIADIC}_v<$T_1$, $T_2$, $U$...>}, +\tcode{std::\placeholder{VARIADIC}<$T_1$, $T_2$, $U$...>::value}, where $T_1$ and $T_2$ are the types or type aliases represented by \tcode{t1} and \tcode{t2}, respectively, and \tcode{$U$...} is the pack of types or type aliases @@ -6918,14 +6953,14 @@ \tcode{info meta::\placeholder{UNARY}(info type);} & A reflection representing the type denoted by -\tcode{std::\placeholder{UNARY}_t<\brk{}$T$>}, +\tcode{std::\placeholder{UNARY}<\brk{}$T$>::type}, where $T$ is the type or type alias represented by \tcode{type} \\ \rowsep \tcode{template\br info meta::\placeholder{VARIADIC}(R\&\& args);} & A reflection representing the type denoted by -\tcode{std::\placeholder{VARIADIC}_t<$T$...>}, +\tcode{std::\placeholder{VARIADIC}<$T$...>::type}, where \tcode{$T$...} is the pack of types or type aliases whose elements are represented by the corresponding elements of \tcode{args} \\ \rowsep @@ -6933,7 +6968,7 @@ \tcode{template\br info meta::\placeholder{VARIADIC}(info type, R\&\& args);} & A reflection representing the type denoted by -\tcode{std::\placeholder{VARIADIC}_t<$T$, $U$...>}, +\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::type}, where \tcode{$T$} is the type or type alias represented by \tcode{type} and \tcode{$U$...} is the pack of types or type aliases whose elements are represented by the corresponding elements of \tcode{args} @@ -6963,7 +6998,7 @@ \begin{itemdescr} \pnum \returns -\tcode{rank_v<$T$>}, +\tcode{std::rank<$T$>::value}, where $T$ is the type represented by \tcode{dealias(type)}. \end{itemdescr} @@ -6975,7 +7010,7 @@ \begin{itemdescr} \pnum \returns -\tcode{extent_v<$T$, $I$>}, +\tcode{std::extent<$T$, $I$>::value}, where $T$ is the type represented by \tcode{dealias(type)} and $I$ is a constant equal to \tcode{i}. \end{itemdescr} @@ -6988,7 +7023,7 @@ \begin{itemdescr} \pnum \returns -\tcode{tuple_size_v<$T$>}, +\tcode{std::tuple_size<$T$>::value}, where $T$ is the type represented by \tcode{dealias(type)}. \end{itemdescr} @@ -7001,7 +7036,7 @@ \pnum \returns A reflection representing -the type denoted by \tcode{tuple_element_t<$I$, $T$>}, +the type denoted by \tcode{std::tuple_element<$I$, $T$>::type}, where $T$ is the type represented by \tcode{dealias(type)} and $I$ is a constant equal to \tcode{index}. \end{itemdescr} @@ -7014,7 +7049,7 @@ \begin{itemdescr} \pnum \returns -\tcode{variant_size_v<$T$>}, +\tcode{std::variant_size<$T$>::value}, where $T$ is the type represented by \tcode{dealias(type)}. \end{itemdescr} @@ -7027,7 +7062,7 @@ \pnum \returns A reflection representing the type denoted by -\tcode{variant_alternative_t<$I$, $T$>}, +\tcode{std::variant_alternative<$I$, $T$>::type}, where $T$ is the type represented by \tcode{dealias(type)} and $I$ is a constant equal to \tcode{index}. \end{itemdescr} @@ -7040,9 +7075,9 @@ \begin{itemdescr} \pnum \returns -\tcode{type_order_v<$T_1$, $T_2$>}, +\tcode{std::type_order<$T_1$, $T_2$>::value}, where $T_1$ and $T_2$ are the types -represented by \tcode{dealias(t1)} and \tcode{dealias(t2)}, respectively. +represented by \tcode{de\-alias(\brk{}t1)} and \tcode{dealias(t2)}, respectively. \end{itemdescr} \rSec1[ratio]{Compile-time rational arithmetic}