From b4692ce2bd4ceaaaa280cffdc85b7fcfbffe38cb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 19:26:42 -0700 Subject: [PATCH 01/24] LWG4198 schedule_from isn't starting the schedule sender if decay-copying results throws --- source/exec.tex | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 2186f2072c..d4ba0a0f4b 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -3026,11 +3026,19 @@ Let \tcode{Sigs} be a pack of the arguments to the \tcode{completion_signatures} specialization named by \tcode{completion_signatures_of_t<\exposid{child-type}, env_of_t>}. -Let \exposid{as-tuple} be an alias template -that transforms a completion signature \tcode{Tag(Args...)} into -the tuple specialization \tcode{\exposid{decayed-tuple}}. +Let \exposid{as-tuple} be an alias template such that +\tcode{\exposid{as-tuple}} denotes +the type \tcode{\exposid{decayed-tuple}}, and +let \exposid{is-no\-throw-decay-copy-sig} be a variable template such that +\tcode{auto(\exposid{is-nothrow-decay-copy-sig})} is +a constant expression of type \tcode{bool} and +equal to \tcode{(is_nothrow_constructible_v, Args> \&\& ...)}. +Let \exposid{error-completion} be a pack consisting of +the type \tcode{set_error_t(exception_ptr)} +if \tcode{(\exposid{is-nothrow-decay-copy-sig} \&\&...)} is \tcode{false}, +and an empty pack otherwise. Then \tcode{variant_t} denotes -the type \tcode{variant...>}, +the type \tcode{variant..., \exposid{error-completion}...>}, except with duplicate types removed. \pnum @@ -3081,15 +3089,14 @@ [](auto, auto& state, auto& rcvr, Tag, Args&&... args) noexcept -> void { using result_t = @\exposid{decayed-tuple}@; - constexpr bool nothrow = is_nothrow_constructible_v; + constexpr bool nothrow = (is_nothrow_constructible_v, Args> && ...); try { state.@\exposid{async-result}@.template emplace(Tag(), std::forward(args)...); } catch (...) { - if constexpr (!nothrow) { - set_error(std::move(rcvr), current_exception()); - return; - } + if constexpr (!nothrow) + state.@\exposid{async-result}@.template emplace>(set_error, current_exception()); } start(state.@\exposid{op-state}@); }; From 464028250a190c47fc1868312a51cc4b6cce7cad Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 19:42:47 -0700 Subject: [PATCH 02/24] LWG4202 enable-sender should be a variable template --- source/exec.tex | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index d4ba0a0f4b..98947004ab 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1946,9 +1946,12 @@ @\exposconcept{is-sender}@ || @\exposconcept{is-awaitable}@>>; // \ref{exec.awaitable} + template + inline constexpr bool enable_sender = @\exposconcept{enable-sender}@; + template concept @\deflibconcept{sender}@ = - bool(@\exposconcept{enable-sender}@>) && + enable_sender> && requires (const remove_cvref_t& sndr) { { get_env(sndr) } -> @\exposconcept{queryable}@; } && @@ -1989,6 +1992,17 @@ starting the resulting operation state are permissible completions for \tcode{Sndr} and \tcode{Env}. +\pnum +\remarks +Pursuant to \ref{namespace.std}, +users may specialize \tcode{enable_sender} to +\tcode{true} for cv-unqualified program-defined types that +model \libconcept{sender}, and +\tcode{false} for types that do not. +Such specializations shall +be usable in constant expressions\iref{expr.const} and +have type \tcode{const bool}. + \pnum A type models the exposition-only concept \defexposconcept{valid-completion-signatures} From 676eb86e0f085feffea4d45298832ff38d1a9d07 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 21:29:20 -0700 Subject: [PATCH 03/24] LWG4203 Constraints on get-state functions are incorrect --- source/exec.tex | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 98947004ab..2c7ed1364d 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1279,6 +1279,8 @@ the expression \tcode{\exposid{FWD-ENV}(env).query(q, as...)} is ill-formed if \tcode{forwarding_query(q)} is \tcode{false}; otherwise, it is expression-equivalent to \tcode{env.query(q, as...)}. +The type \tcode{\exposid{FWD-ENV-T}(Env)} is +\tcode{decltype(\exposid{FWD-ENV}(declval()))}. \pnum For a query object \tcode{q} and \tcode{a} subexpression \tcode{v}, @@ -3009,7 +3011,7 @@ is initialized with a callable object equivalent to the following lambda: \begin{codeblock} [](Sndr&& sndr, Rcvr& rcvr) noexcept(@\seebelow@) - requires @\libconcept{sender_in}@<@\exposid{child-type}@, env_of_t> { + requires @\libconcept{sender_in}@<@\exposid{child-type}@, @\exposid{FWD-ENV-T}@(env_of_t)> { auto& [_, sch, child] = sndr; @@ -3039,7 +3041,7 @@ \pnum Let \tcode{Sigs} be a pack of the arguments to the \tcode{completion_signatures} specialization -named by \tcode{completion_signatures_of_t<\exposid{child-type}, env_of_t>}. +named by \tcode{completion_signatures_of_t<\exposid{child-type}, \exposid{FWD-ENV-T}(env_of_t)>}. Let \exposid{as-tuple} be an alias template such that \tcode{\exposid{as-tuple}} denotes the type \tcode{\exposid{decayed-tuple}}, and @@ -3514,9 +3516,13 @@ \item given a query object \tcode{q}, the expression \tcode{e.query(q)} is expression-equivalent -to \tcode{\exposid{env}.query(q)} if that expression is valid, -otherwise \tcode{e.query(q)} is expression-equivalent -to \tcode{get_env(\exposid{rcvr}).query(q)}. +to \tcode{\exposid{env}.query(q)} if that expression is valid; +otherwise, +if the type of \tcode{q} satisfies \exposconcept{forwarding-query}, +\tcode{e.query(q)} is expression-equivalent +to \tcode{get_env(\exposid{rcvr}).query(q)}; +otherwise, +\tcode{e.query(q)} is ill-formed. \end{itemize} \pnum @@ -3543,7 +3549,7 @@ \pnum Let \tcode{Sigs} be a pack of the arguments to the \tcode{completion_signatures} specialization named by -\tcode{completion_signatures_of_t<\exposid{child-type}, env_of_t>}. +\tcode{completion_signatures_of_t<\exposid{child-type}, \exposid{FWD-ENV-T}(env_of_t)>}. Let \tcode{LetSigs} be a pack of those types in \tcode{Sigs} with a return type of \tcode{\exposid{decayed-typeof}<\exposid{set-cpo}>}. Let \exposid{as-tuple} be an alias template @@ -4174,7 +4180,8 @@ \tcode{e.query(get_stop_token)} is expression-equivalent to \tcode{state.\exposid{stop-src}.get_token()}, and \item -given a query object \tcode{q} with type other than \cv{} \tcode{stop_token_t}, +given a query object \tcode{q} with type other than \cv{} \tcode{stop_token_t} +and whose type satisfies \exposconceptx{forwarding-que\-ry}{forwarding-query}, \tcode{e.query(q)} is expression-equivalent to \tcode{get_env(rcvr).query(q)}. \end{itemize} @@ -4201,7 +4208,7 @@ template struct @\exposid{make-state}@ { - template<@\exposconcept{max-1-sender-in}@>... Sndrs> + template<@\exposconcept{max-1-sender-in}@<@\exposid{FWD-ENV-T}@(env_of_t)>... Sndrs> auto operator()(auto, auto, Sndrs&&... sndrs) const { using values_tuple = @\seebelow@; using errors_variant = @\seebelow@; @@ -4238,7 +4245,7 @@ \pnum The alias \tcode{values_tuple} denotes the type \begin{codeblock} -tuple, @\exposid{decayed-tuple}@, optional>...> +tuple), @\exposid{decayed-tuple}@, optional>...> \end{codeblock} if that type is well-formed; otherwise, \tcode{tuple<>}. @@ -4426,7 +4433,7 @@ is initialized with a callable object equivalent to the following lambda: \begin{codeblock} [](Sndr&& sndr, Rcvr& rcvr) noexcept - -> type_identity, env_of_t>> { + -> type_identity, @\exposid{FWD-ENV-T}@(env_of_t)>> { return {}; } \end{codeblock} @@ -4471,14 +4478,14 @@ \tcode{Env} is \tcode{decltype((env))}. If \tcode{\exposconcept{sender-for}} is \tcode{false}, or -if the type \tcode{\exposid{single-sender-value-type}} +if the type \tcode{\exposid{single-sender-value-type}<\linebreak{}\exposid{child-type}, \exposid{FWD-ENV-T}(Env)>} is ill-formed or \tcode{void}, -then the expression \tcode{stopped_as_optional.transform_sender(sndr, env)} +then the expression \tcode{stopped_as_optional.\linebreak{}transform_sender(sndr, env)} is ill-formed; otherwise, it is equivalent to: \begin{codeblock} auto&& [_, _, child] = sndr; -using V = @\exposid{single-sender-value-type}@; +using V = @\exposid{single-sender-value-type}@<@\exposid{child-type}@, @\exposid{FWD-ENV-T}@(Env)>; return let_stopped( then(std::forward_like(child), [](Ts&&... ts) noexcept(is_nothrow_constructible_v) { From bd1733762c1c41bc1f2c1668c1ee0c4ee84fbc4d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 22:59:06 -0700 Subject: [PATCH 04/24] LWG4204 specification of as-sndr2(Sig) in [exec.let] is incomplete --- source/exec.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index 2c7ed1364d..3b65a62af5 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -3567,7 +3567,7 @@ Then \tcode{ops2_variant_t} denotes the type \begin{codeblock} -variant, @\exposid{receiver2}@>...> +variant, @\exposid{receiver2}@>...> \end{codeblock} except with duplicate types removed. From 89517e69f114020e37bfa134884f596471780179 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:05:48 -0700 Subject: [PATCH 05/24] LWG4205 let_[*].transform_env is specified in terms of the let_* sender itself instead of its child [exec.let] Added : before codeblock for consistency. --- source/exec.tex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 3b65a62af5..ab0d956073 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -3612,8 +3612,11 @@ is \tcode{false}, then the expression \tcode{\exposid{let-cpo}.transform_env(sndr, env)} is ill-formed. -Otherwise, it is equal to -\tcode{\exposid{JOIN-ENV}(\exposid{let-env}(sndr), \exposid{FWD-ENV}(env))}. +Otherwise, it is equal to: +\begin{codeblock} +auto& [_, _, child] = sndr; +return @\exposid{JOIN-ENV}@(@\exposid{let-env}@(child), @\exposid{FWD-ENV}@(env)); +\end{codeblock} \pnum Let the subexpression \tcode{out_sndr} denote From 4d8b0f84981efa3bcd57409f006e0d9a5d2e0d08 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:24:07 -0700 Subject: [PATCH 06/24] LWG4208 Wording needs to ensure that in connect(sndr, rcvr) that rcvr expression is only evaluated once --- source/exec.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/exec.tex b/source/exec.tex index ab0d956073..1c0ffb173f 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -2577,6 +2577,9 @@ \item Otherwise, \tcode{\exposid{connect-awaitable}(new_sndr, rcvr)}. \end{itemize} +%%FIXME: This sentence should be joined with the previous sentences; +%%FIXME: how to do that with the embeded "madates"?? +Except that \tcode{rcvr} is evaluated only once. \mandates \tcode{\libconcept{sender} \&\& \libconcept{receiver}} is \tcode{true}. From 68582c9cc1c1832f131f8a43ea95edb24224fb4f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:27:52 -0700 Subject: [PATCH 07/24] LWG4209 default_domain::transform_env should be returning FWD-ENV(env) --- source/exec.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index 1c0ffb173f..4e135263c5 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -2247,7 +2247,7 @@ tag_of_t().transform_env(std::forward(sndr), std::forward(env)) \end{codeblock} if that expression is well-formed; -otherwise, \tcode{static_cast(std::forward(env))}. +otherwise, \tcode{\exposid{FWD-ENV}(std::forward(env))}. \pnum \mandates From bf1933bf9ae89fbfda813304458f0d8eeaf2ea55 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:31:09 -0700 Subject: [PATCH 08/24] LWG4188 ostream::sentry destructor should handle exceptions --- source/iostreams.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 74370c6a7b..b157c5f4df 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -6257,7 +6257,8 @@ is \tcode{true}, calls -\tcode{os.rdbuf()->pubsync()}. If that function returns $-1$, sets \tcode{badbit} in +\tcode{os.rdbuf()->pubsync()}. If that function returns $-1$ or +exits via an exception, sets \tcode{badbit} in \tcode{os.rdstate()} without propagating an exception. \end{itemdescr} From a027f335adf47ee279833f652985a2dc2f65d790 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:35:08 -0700 Subject: [PATCH 09/24] LWG4200 The operation_state concept can be simplified --- source/exec.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 4e135263c5..18a0cb99e8 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1189,9 +1189,8 @@ template concept @\deflibconcept{operation_state}@ = @\libconcept{derived_from}@ && - is_object_v && requires (O& o) { - { start(o) } noexcept; + start(o); }; } \end{codeblock} From 78594f88ec60e575a81638e76ad763e7db3e5a7c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:44:12 -0700 Subject: [PATCH 10/24] LWG4201 with-await-transform::await_transform should not use a deduced return type --- source/exec.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 18a0cb99e8..39155bf0b1 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -2156,8 +2156,9 @@ } template<@\exposconcept{has-as-awaitable}@ T> - decltype(auto) await_transform(T&& value) - noexcept(noexcept(std::forward(value).as_awaitable(declval()))) { + auto await_transform(T&& value) + noexcept(noexcept(std::forward(value).as_awaitable(declval()))) + -> decltype(std::forward(value).as_awaitable(declval())) { return std::forward(value).as_awaitable(static_cast(*this)); } }; From 24ab7008488349168522e98750a8064ca2deb3c2 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 24 Jun 2025 23:52:23 -0700 Subject: [PATCH 11/24] LWG4217 Clarify mdspan layout mapping requirements for rank == 0 --- source/containers.tex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index a415351613..91c0135443 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -21803,6 +21803,13 @@ \pnum \returns $s_r$ as defined in \tcode{m.is_strided()} above. + +\pnum +\begin{note} +It is not required for \tcode{m.stride(r)} to be well-formed +if \tcode{m.extents().rank()} is zero, +even if \tcode{m.is_always_strided()} is \tcode{true}. +\end{note} \end{itemdescr} \begin{itemdecl} From 1c09ce8b54e2e3c43b46b955f8670d997bea675b Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 00:44:10 -0700 Subject: [PATCH 12/24] LWG4222 expected constructor from a single value missing a constraint [expected.object.cons]p23.2 Fly-by fix expression (">" in wrong place). --- source/utilities.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index caae42247e..3f86cd5fd2 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7789,7 +7789,9 @@ \item \tcode{is_same_v, in_place_t>} is \tcode{false}; and \item -\tcode{is_same_v>, expected} is \tcode{false}; and +\tcode{is_same_v, expected>} is \tcode{false}; and +\item +\tcode{is_same_v, unexpect_t>} is \tcode{false}; and \item \tcode{remove_cvref_t} is not a specialization of \tcode{unexpected}; and \item From 93479fd44ce9fdf2783bc27c911726867225a4a2 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:01:39 -0700 Subject: [PATCH 13/24] LWG4224 Philox engines should be freestanding --- source/numerics.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 79f510686c..110feae360 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1403,7 +1403,7 @@ // \ref{rand.eng.philox}, class template \tcode{philox_engine} template - class philox_engine; + class philox_engine; // partially freestanding // \ref{rand.predef}, engines and engine adaptors with predefined parameters using minstd_rand0 = @\seebelow@; // freestanding @@ -1415,8 +1415,8 @@ using ranlux24 = @\seebelow@; // freestanding using ranlux48 = @\seebelow@; // freestanding using knuth_b = @\seebelow@; - using philox4x32 = @\seebelow@; - using philox4x64 = @\seebelow@; + using philox4x32 = @\seebelow@; // freestanding + using philox4x64 = @\seebelow@; // freestanding using default_random_engine = @\seebelow@; @@ -3303,10 +3303,10 @@ // inserters and extractors template friend basic_ostream& - operator<<(basic_ostream& os, const philox_engine& x); + operator<<(basic_ostream& os, const philox_engine& x); // hosted template friend basic_istream& - operator>>(basic_istream& is, philox_engine& x); + operator>>(basic_istream& is, philox_engine& x); // hosted }; } \end{codeblock} From 6b81b725b0ef30da9823a5fe9f08a40c03be2bf2 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:05:32 -0700 Subject: [PATCH 14/24] LWG4227 Missing noexcept operator in [exec.when.all] --- source/exec.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/exec.tex b/source/exec.tex index 39155bf0b1..c589c0ad80 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -4196,7 +4196,7 @@ is initialized with a callable object equivalent to the following lambda expression: \begin{codeblock} -[](Sndr&& sndr, Rcvr& rcvr) noexcept(@$e$@) -> decltype(@$e$@) { +[](Sndr&& sndr, Rcvr& rcvr) noexcept(noexcept(@$e$@)) -> decltype(@$e$@) { return @$e$@; } \end{codeblock} From 42dee0d932967126643961677476fa2e91ed6fe8 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:17:28 -0700 Subject: [PATCH 15/24] LWG4231 datapar::chunk should use simd-size-type instead of size_t --- source/numerics.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 110feae360..4d4c3c2500 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -16599,9 +16599,9 @@ template constexpr auto chunk(const basic_simd_mask<@\exposid{mask-element-size}@, Abi>& x) noexcept; - template + template<@\exposid{simd-size-type}@ N, class T, class Abi> constexpr auto chunk(const basic_simd& x) noexcept; - template + template<@\exposid{simd-size-type}@ N, size_t Bytes, class Abi> constexpr auto chunk(const basic_simd_mask& x) noexcept; template @@ -18371,7 +18371,7 @@ \end{itemdescr} \begin{itemdecl} -template +template<@\exposid{simd-size-type}@ N, class T, class Abi> constexpr auto chunk(const basic_simd& x) noexcept; \end{itemdecl} @@ -18382,7 +18382,7 @@ \end{itemdescr} \begin{itemdecl} -template +template<@\exposid{simd-size-type}@ N, size_t Bytes, class Abi> constexpr auto chunk(const basic_simd_mask& x) noexcept; \end{itemdecl} From 488aa7311ee49572b9d3021c56a7db8d9841f840 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:22:34 -0700 Subject: [PATCH 16/24] LWG4232 datapar::resize does not resize --- source/numerics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 4d4c3c2500..813819412d 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -17132,10 +17132,10 @@ \pnum If \tcode V is a specialization of \tcode{basic_simd}, let \tcode{Abi1} denote an ABI tag such that \tcode{basic_simd::\brk{}size()} equals -\tcode{V::size()}. +\tcode{N}. If \tcode V is a specialization of \tcode{basic_simd_mask}, let \tcode{Abi1} denote an ABI tag such that \tcode{basic_simd_mask::\brk{}size()} equals \tcode{V::size()}. +Abi1>::size()} equals \tcode{N}. \pnum Where present, the member typedef \tcode{type} names \tcode{basic_simd} From 54065328a348f70c3ddb33eb904ada236a431219 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:26:08 -0700 Subject: [PATCH 17/24] LWG4233 The helper lambda of std::erase for hive should specify return type as bool --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 91c0135443..e2606a48b0 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -8942,7 +8942,7 @@ \indexlibrarymember{erase}{hive}% \begin{itemdecl} -template +template typename hive::size_type erase(hive& c, const U& value); \end{itemdecl} @@ -8952,7 +8952,7 @@ \effects Equivalent to: \begin{codeblock} -return erase_if(c, [&](auto& elem) { return elem == value; }); +return erase_if(c, [&](const auto& elem) -> bool { return elem == value; }); \end{codeblock} \end{itemdescr} From ac8c439070fd4dd5ecb2328d0f1aebf31d1c53c4 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 01:28:53 -0700 Subject: [PATCH 18/24] LWG4234 Including doesn't provide std::begin/end --- source/iterators.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/iterators.tex b/source/iterators.tex index e073c00100..ccd545cfc4 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -7243,6 +7243,7 @@ \libheaderrefx{flat_map}{flat.map.syn}, \libheaderrefx{flat_set}{flat.set.syn}, \libheaderrefx{forward_list}{forward.list.syn}, +\libheaderref{hive}, \libheaderrefx{inplace_vector}{inplace.vector.syn}, \libheaderref{list}, \libheaderrefx{map}{associative.map.syn}, From 7c828919272a04a65378ea78e415134104622fdb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 02:20:58 -0700 Subject: [PATCH 19/24] LWG4235 cache_latest_view and to_input_view miss reserve_hint --- source/ranges.tex | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index a76fa8fd6a..491050c671 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -17371,6 +17371,9 @@ constexpr auto size() requires @\libconcept{sized_range}@; constexpr auto size() const requires @\libconcept{sized_range}@; + + constexpr auto reserve_hint() requires @\libconcept{approximately_sized_range}@; + constexpr auto reserve_hint() const requires @\libconcept{approximately_sized_range}@; }; template @@ -17423,6 +17426,18 @@ Equivalent to: \tcode{return ranges::size(\exposid{base_});} \end{itemdescr} +\indexlibrarymember{reserve_hint}{cache_latest_view}% +\begin{itemdecl} +constexpr auto reserve_hint() requires @\libconcept{approximately_sized_range}@; +constexpr auto reserve_hint() const requires @\libconcept{approximately_sized_range}@; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: \tcode{return ranges::reserve_hint(\exposid{base_});} +\end{itemdescr} + \rSec3[range.cache.latest.iterator]{Class \tcode{cache_latest_view::\exposid{iterator}}} \indexlibraryglobal{cache_latest_view::\exposid{iiterator}}% @@ -17721,6 +17736,9 @@ constexpr auto size() requires @\libconcept{sized_range}@; constexpr auto size() const requires @\libconcept{sized_range}@; + + constexpr auto reserve_hint() requires @\libconcept{approximately_sized_range}@; + constexpr auto reserve_hint() const requires @\libconcept{approximately_sized_range}@; }; template @@ -17785,6 +17803,18 @@ Equivalent to: \tcode{return ranges::size(\exposid{base_});} \end{itemdescr} +\indexlibrarymember{reserve_hint}{to_input_view}% +\begin{itemdecl} +constexpr auto reserve_hint() requires @\libconcept{approximately_sized_range}@; +constexpr auto reserve_hint() const requires @\libconcept{approximately_sized_range}@; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: \tcode{return ranges::reserve_hint(\exposid{base_});} +\end{itemdescr} + \rSec3[range.to.input.iterator]{Class template \tcode{to_input_view::\exposid{iterator}}} \indexlibraryglobal{to_input_view::\exposid{iterator}}% From a7b3313817753c54c84384bff9146ae9ffad91fd Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 13:57:33 -0700 Subject: [PATCH 20/24] LWG4236 chunk_view::outer-iterator::value_type should provide reserve_hint --- source/ranges.tex | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 491050c671..1d254ee520 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -14064,6 +14064,8 @@ constexpr auto size() const requires @\libconcept{sized_sentinel_for}@, iterator_t>; + + constexpr auto reserve_hint() const noexcept; }; } \end{codeblock} @@ -14117,6 +14119,20 @@ \end{codeblock} \end{itemdescr} +\indexlibrarymember{reserve_hint}{chunk_view::\exposid{outer-iterator}::value_type}% +\begin{itemdecl} +constexpr auto reserve_hint() const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: +\begin{codeblock} +return @\exposid{to-unsigned-like}@(@\exposid{parent_}@->@\exposid{remainder_}@); +\end{codeblock} +\end{itemdescr} + \rSec3[range.chunk.inner.iter]{Class \tcode{chunk_view::\exposid{inner-iterator}}} \indexlibraryglobal{chunk_view::\exposid{inner-iterator}}% From 42ec4268dee7f584fd9d4d89677b062ac4f60236 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 14:01:04 -0700 Subject: [PATCH 21/24] LWG4239 flat_map's transparent comparator no longer works for string literals --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index e2606a48b0..67e8289b23 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -17940,7 +17940,7 @@ \tcode{*this} and \tcode{args...} are unchanged. Otherwise equivalent to: \begin{codeblock} -auto key_it = ranges::upper_bound(@\exposid{c}@.keys, k, @\exposid{compare}@); +auto key_it = upper_bound(@\exposid{c}@.keys.begin(), @\exposid{c}@.keys.end(), k, @\exposid{compare}@); auto value_it = @\exposid{c}@.values.begin() + distance(@\exposid{c}@.keys.begin(), key_it); @\exposid{c}@.keys.emplace(key_it, std::forward(k)); @\exposid{c}@.values.emplace(value_it, std::forward(args)...); From 2a9aa981bf3c5b28dab9ca266344686af9136a43 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 14:03:59 -0700 Subject: [PATCH 22/24] LWG4242 ranges::distance does not work with volatile iterators --- source/iterators.tex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/iterators.tex b/source/iterators.tex index ccd545cfc4..c5460d8d9f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -3068,7 +3068,13 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return last - static_cast\&>(first);} +Equivalent to: +\begin{codeblock} +if constexpr (!is_array_v>) + return last - first; +else + return last - static_cast>(first); +\end{codeblock} \end{itemdescr} \indexlibraryglobal{distance}% From e0a0fbffee7186e40e8ef10b088b8543e8f5493d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 14:08:32 -0700 Subject: [PATCH 23/24] LWG4245 Operators that interact with counted_iterator and default_sentinel_t should be noexcept --- source/iterators.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index c5460d8d9f..7423730269 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5971,9 +5971,9 @@ friend constexpr iter_difference_t operator-( const counted_iterator& x, const counted_iterator& y); friend constexpr iter_difference_t operator-( - const counted_iterator& x, default_sentinel_t); + const counted_iterator& x, default_sentinel_t) noexcept; friend constexpr iter_difference_t operator-( - default_sentinel_t, const counted_iterator& y); + default_sentinel_t, const counted_iterator& y) noexcept; constexpr counted_iterator& operator-=(iter_difference_t n) requires @\libconcept{random_access_iterator}@; @@ -5984,7 +5984,7 @@ friend constexpr bool operator==( const counted_iterator& x, const counted_iterator& y); friend constexpr bool operator==( - const counted_iterator& x, default_sentinel_t); + const counted_iterator& x, default_sentinel_t) noexcept; template<@\libconcept{common_with}@ I2> friend constexpr strong_ordering operator<=>( @@ -6315,7 +6315,7 @@ \indexlibrarymember{operator-}{counted_iterator}% \begin{itemdecl} friend constexpr iter_difference_t operator-( - const counted_iterator& x, default_sentinel_t); + const counted_iterator& x, default_sentinel_t) noexcept; \end{itemdecl} \begin{itemdescr} @@ -6328,7 +6328,7 @@ \indexlibrarymember{operator-}{counted_iterator}% \begin{itemdecl} friend constexpr iter_difference_t operator-( - default_sentinel_t, const counted_iterator& y); + default_sentinel_t, const counted_iterator& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -6381,7 +6381,7 @@ \indexlibrarymember{operator==}{counted_iterator}% \begin{itemdecl} friend constexpr bool operator==( - const counted_iterator& x, default_sentinel_t); + const counted_iterator& x, default_sentinel_t) noexcept; \end{itemdecl} \begin{itemdescr} From 54ce6ab31bc96d40f7e26145a5e836efbb0fea12 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 25 Jun 2025 14:17:54 -0700 Subject: [PATCH 24/24] LWG4247 Header is not yet freestanding --- source/lib-intro.tex | 1 + source/utilities.tex | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 76157ac902..7d6d3012ff 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1630,6 +1630,7 @@ \ref{expected} & Expected objects & \tcode{} \\ \rowsep \ref{function.objects} & Function objects & \tcode{} \\ \rowsep \ref{bit} & Bit manipulation & \tcode{} \\ \rowsep +\ref{stdbit.h.syn} & C-compatible bit manipulation & \tcode{} \\ \rowsep \ref{array} & Class template \tcode{array} & \tcode{} \\ \rowsep \ref{inplace.vector} & Class template \tcode{inplace_vector} & \tcode{} \\ \rowsep \ref{views.contiguous} & Contiguous access & \tcode{} \\ \rowsep diff --git a/source/utilities.tex b/source/utilities.tex index 3f86cd5fd2..4c0a9896e1 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15508,6 +15508,8 @@ \indexheader{stdbit.h}% \begin{codeblock} +// all freestanding + #define @\libmacro{__STDC_VERSION_STDBIT_H__}@ 202311L #define @\libmacro{__STDC_ENDIAN_BIG__}@ @\seebelow@