Skip to content

Commit cc902d3

Browse files
authored
Merge 2026-03 LWG Motion 1
P4145R0 C++ Standard Library Ready Issues to be moved in Croydon, Mar. 2026
2 parents bfa9108 + a3bbccb commit cc902d3

18 files changed

+358
-194
lines changed

source/algorithms.tex

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,16 +2316,6 @@
23162316
template<@\libconcept{input_or_output_iterator}@ O, @\libconcept{copy_constructible}@ F>
23172317
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
23182318
constexpr O generate_n(O first, iter_difference_t<O> n, F gen);
2319-
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ O, @\libconcept{sized_sentinel_for}@<O> S,
2320-
@\libconcept{copy_constructible}@ F>
2321-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
2322-
O generate(Ep&& exec, O first, S last, F gen); // freestanding-deleted
2323-
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, @\libconcept{copy_constructible}@ F>
2324-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<iterator_t<R>, invoke_result_t<F&>>
2325-
borrowed_iterator_t<R> generate(Ep&& exec, R&& r, F gen); // freestanding-deleted
2326-
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ O, @\libconcept{copy_constructible}@ F>
2327-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
2328-
O generate_n(Ep&& exec, O first, iter_difference_t<O> n, F gen); // freestanding-deleted
23292319
}
23302320

23312321
// \ref{alg.remove}, remove
@@ -2857,12 +2847,12 @@
28572847
class Comp = ranges::less, class Proj = identity>
28582848
requires @\libconcept{sortable}@<I, Comp, Proj>
28592849
I stable_sort(Ep&& exec, I first, S last, Comp comp = {},
2860-
Proj proj = {}); // freestanding-deleted
2850+
Proj proj = {}); // hosted
28612851
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Comp = ranges::less,
28622852
class Proj = identity>
28632853
requires @\libconcept{sortable}@<iterator_t<R>, Comp, Proj>
28642854
borrowed_iterator_t<R>
2865-
stable_sort(Ep&& exec, R&& r, Comp comp = {}, Proj proj = {}); // freestanding-deleted
2855+
stable_sort(Ep&& exec, R&& r, Comp comp = {}, Proj proj = {}); // hosted
28662856
}
28672857

28682858
template<class RandomAccessIterator>
@@ -3261,12 +3251,12 @@
32613251
requires @\libconcept{permutable}@<I>
32623252
subrange<I>
32633253
stable_partition(Ep&& exec, I first, S last, Pred pred,
3264-
Proj proj = {}); // freestanding-deleted
3254+
Proj proj = {}); // hosted
32653255
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
32663256
@\libconcept{indirect_unary_predicate}@<projected<iterator_t<R>, Proj>> Pred>
32673257
requires @\libconcept{permutable}@<iterator_t<R>>
32683258
borrowed_subrange_t<R>
3269-
stable_partition(Ep&& exec, R&& r, Pred pred, Proj proj = {}); // freestanding-deleted
3259+
stable_partition(Ep&& exec, R&& r, Pred pred, Proj proj = {}); // hosted
32703260
}
32713261

32723262
template<class InputIterator, class OutputIterator1,
@@ -3434,13 +3424,13 @@
34343424
class Comp = ranges::less, class Proj = identity>
34353425
requires @\libconcept{sortable}@<I, Comp, Proj>
34363426
I inplace_merge(Ep&& exec, I first, I middle, S last, Comp comp = {},
3437-
Proj proj = {}); // freestanding-deleted
3427+
Proj proj = {}); // hosted
34383428
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Comp = ranges::less,
34393429
class Proj = identity>
34403430
requires @\libconcept{sortable}@<iterator_t<R>, Comp, Proj>
34413431
borrowed_iterator_t<R>
34423432
inplace_merge(Ep&& exec, R&& r, iterator_t<R> middle, Comp comp = {},
3443-
Proj proj = {}); // freestanding-deleted
3433+
Proj proj = {}); // hosted
34443434
}
34453435

34463436
// \ref{alg.set.operations}, set operations
@@ -7492,17 +7482,6 @@
74927482
template<@\libconcept{input_or_output_iterator}@ O, @\libconcept{copy_constructible}@ F>
74937483
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
74947484
constexpr O ranges::generate_n(O first, iter_difference_t<O> n, F gen);
7495-
7496-
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ O, @\libconcept{sized_sentinel_for}@<O> S,
7497-
@\libconcept{copy_constructible}@ F>
7498-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
7499-
O ranges::generate(Ep&& exec, O first, S last, F gen);
7500-
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, @\libconcept{copy_constructible}@ F>
7501-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<iterator_t<R>, invoke_result_t<F&>>
7502-
borrowed_iterator_t<R> ranges::generate(Ep&& exec, R&& r, F gen);
7503-
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ O, @\libconcept{copy_constructible}@ F>
7504-
requires @\libconcept{invocable}@<F&> && @\libconcept{indirectly_writable}@<O, invoke_result_t<F&>>
7505-
O ranges::generate_n(Ep&& exec, O first, iter_difference_t<O> n, F gen);
75067485
\end{itemdecl}
75077486

75087487
\begin{itemdescr}

source/containers.tex

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8847,7 +8847,8 @@
88478847
\pnum
88488848
\throws
88498849
\tcode{length_error} if any of \tcode{x}'s active blocks
8850-
are not within the bounds of \exposid{current-limits}.
8850+
are not within the bounds of \exposid{current-limits},
8851+
as well as any exceptions thrown by the allocator.
88518852

88528853
\pnum
88538854
\complexity
@@ -10651,6 +10652,18 @@
1065110652
\tcode{*this}.
1065210653
\end{itemdescr}
1065310654

10655+
\indexlibrarymember{operator bool}{vector<bool>::reference}%
10656+
\begin{itemdecl}
10657+
constexpr reference::operator bool() const noexcept;
10658+
\end{itemdecl}
10659+
10660+
\begin{itemdescr}
10661+
\pnum
10662+
\returns
10663+
\tcode{true} if the value of the bit referred to by \tcode{*this} is one,
10664+
\tcode{false} otherwise.
10665+
\end{itemdescr}
10666+
1065410667
\indexlibrarymember{flip}{vector<bool>::reference}%
1065510668
\begin{itemdecl}
1065610669
constexpr void reference::flip() noexcept;
@@ -19494,8 +19507,8 @@
1949419507
\effects
1949519508
Adds elements to \exposid{c} as if by:
1949619509
\begin{codeblock}
19497-
ranges::for_each(rg, [&](auto&& e) {
19498-
@\exposid{c}@.insert(@\exposid{c}@.end(), std::forward<decltype(e)>(e));
19510+
ranges::for_each(rg, [&](value_type e) {
19511+
@\exposid{c}@.insert(@\exposid{c}@.end(), std::move(e));
1949919512
});
1950019513
\end{codeblock}
1950119514
Then,
@@ -20182,8 +20195,8 @@
2018220195
\effects
2018320196
Adds elements to \exposid{c} as if by:
2018420197
\begin{codeblock}
20185-
ranges::for_each(rg, [&](auto&& e) {
20186-
@\exposid{c}@.insert(@\exposid{c}@.end(), std::forward<decltype(e)>(e));
20198+
ranges::for_each(rg, [&](value_type e) {
20199+
@\exposid{c}@.insert(@\exposid{c}@.end(), std::move(e));
2018720200
});
2018820201
\end{codeblock}
2018920202
Then, sorts the range of newly inserted elements with respect to \exposid{compare},
@@ -20392,10 +20405,7 @@
2039220405
concept @\defexposconcept{integral-constant-like}@ = // \expos
2039320406
is_integral_v<remove_cvref_t<decltype(T::value)>> &&
2039420407
!is_same_v<bool, remove_cvref_t<decltype(T::value)>> &&
20395-
@\libconcept{convertible_to}@<T, decltype(T::value)> &&
20396-
@\libconcept{equality_comparable_with}@<T, decltype(T::value)> &&
20397-
bool_constant<T() == T::value>::value &&
20398-
bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value;
20408+
@\exposconcept{constexpr-wrapper-like}@<T>;
2039920409

2040020410
template<class T>
2040120411
constexpr size_t @\defexposconcept{maybe-static-ext}@ = dynamic_extent; // \expos
@@ -21289,12 +21299,12 @@
2128921299
inline constexpr full_extent_t full_extent{};
2129021300

2129121301
template<class IndexType, size_t... Extents, class... SliceSpecifiers>
21292-
constexpr auto submdspan_extents(const extents<IndexType, Extents...>&, SliceSpecifiers...);
21302+
constexpr auto subextents(const extents<IndexType, Extents...>&, SliceSpecifiers...);
2129321303

2129421304
// \ref{mdspan.sub.canonical}, \tcode{submdspan} slice canonicalization
2129521305
template<class IndexType, size_t... Extents, class... Slices>
21296-
constexpr auto submdspan_canonicalize_slices(const extents<IndexType, Extents...>& src,
21297-
Slices... slices);
21306+
constexpr auto canonical_slices(const extents<IndexType, Extents...>& src,
21307+
Slices... slices);
2129821308

2129921309
// \ref{mdspan.sub.sub}, \tcode{submdspan} function template
2130021310
template<class ElementType, class Extents, class LayoutPolicy,
@@ -25033,7 +25043,7 @@
2503325043
typename MappingType::layout_type>;
2503425044

2503525045
template<class MappingType, class AccessorType>
25036-
mdspan(const typename AccessorType::data_handle_type&, const MappingType&,
25046+
mdspan(typename AccessorType::data_handle_type, const MappingType&,
2503725047
const AccessorType&)
2503825048
-> mdspan<typename AccessorType::element_type, typename MappingType::extents_type,
2503925049
typename MappingType::layout_type, AccessorType>;
@@ -25846,11 +25856,12 @@
2584625856

2584725857
\rSec4[mdspan.sub.canonical]{\tcode{submdspan} slice canonicalization}
2584825858

25849-
\indexlibraryglobal{submdspan_canonicalize_slices}%
25859+
%FIXME: "Slices" is used instead of "SliceSpecifiers" in the synopsis declaration.
25860+
\indexlibraryglobal{canonical_slices}%
2585025861
\begin{itemdecl}
2585125862
template<class IndexType, size_t... Extents, class... SliceSpecifiers>
25852-
constexpr auto submdspan_canonicalize_slices(const extents<IndexType, Extents...>& src,
25853-
SliceSpecifiers... slices);
25863+
constexpr auto canonical_slices(const extents<IndexType, Extents...>& src,
25864+
SliceSpecifiers... slices);
2585425865
\end{itemdecl}
2585525866

2585625867
\begin{itemdescr}
@@ -25882,20 +25893,20 @@
2588225893
\tcode{make_tuple(\exposid{canonical-slice}<IndexType>(slices)...)}.
2588325894
\end{itemdescr}
2588425895

25885-
\rSec4[mdspan.sub.extents]{\tcode{submdspan_extents} function}
25896+
\rSec4[mdspan.sub.extents]{\tcode{subextents} function}
2588625897

25887-
\indexlibraryglobal{submdspan_extents}%
25898+
\indexlibraryglobal{subextents}%
2588825899
\begin{itemdecl}
2588925900
template<class IndexType, size_t... Extents, class... SliceSpecifiers>
25890-
constexpr auto submdspan_extents(const extents<IndexType, Extents...>& src,
25891-
SliceSpecifiers... raw_slices);
25901+
constexpr auto subextents(const extents<IndexType, Extents...>& src,
25902+
SliceSpecifiers... raw_slices);
2589225903
\end{itemdecl}
2589325904

2589425905
\begin{itemdescr}
2589525906
\pnum
2589625907
Let \tcode{slices} be the pack introduced by the following declaration:
2589725908
\begin{codeblock}
25898-
auto [...slices] = submdspan_canonicalize_slices(src, raw_slices...);
25909+
auto [...slices] = canonical_slices(src, raw_slices...);
2589925910
\end{codeblock}
2590025911

2590125912
\pnum
@@ -26048,7 +26059,7 @@
2604826059
An object \tcode{smr} of type \tcode{SMR} such that
2604926060
\begin{itemize}
2605026061
\item
26051-
\tcode{smr.mapping.extents() == submdspan_extents(m.extents(), valid_slices...)}
26062+
\tcode{smr.mapping.extents() == subextents(m.extents(), valid_slices...)}
2605226063
is \tcode{true};\newline and
2605326064
\item
2605426065
for each integer pack \tcode{i}
@@ -26121,7 +26132,7 @@
2612126132

2612226133
\pnum
2612326134
Let \tcode{sub_ext} be
26124-
the result of \tcode{submdspan_extents(extents(), slices...)} and
26135+
the result of \tcode{subextents(extents(), slices...)} and
2612526136
let \tcode{SubExtents} be \tcode{decl\-type(sub_ext)}.
2612626137

2612726138
\pnum
@@ -26502,7 +26513,7 @@
2650226513
\pnum
2650326514
Let \tcode{slices} be the pack introduced by the following declaration:
2650426515
\begin{codeblock}
26505-
auto [...slices] = submdspan_canonicalize_slices(src, raw_slices...);
26516+
auto [...slices] = canonical_slices(src, raw_slices...);
2650626517
\end{codeblock}
2650726518

2650826519
\pnum

source/diagnostics.tex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,11 @@
495495

496496
\pnum
497497
If \mname{VA_ARGS} does not expand to
498-
an \grammarterm{assignment-expression},
498+
a well-formed \grammarterm{assignment-expression},
499499
the program is ill-formed.
500+
If such an \grammarterm{assignment-expression} is ill-formed when
501+
treated as an unevaluated operand\iref{expr.await, expr.yield},
502+
the program is ill-formed, no diagnostic required.
500503

501504
\pnum
502505
The macro \tcode{assert} is redefined according to

source/exec.tex

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7227,7 +7227,6 @@
72277227

72287228
public:
72297229
using sender_concept = sender_t;
7230-
using completion_signatures = @\seebelow@;
72317230
using allocator_type = @\seebelow@;
72327231
using scheduler_type = @\seebelow@;
72337232
using stop_source_type = @\seebelow@;
@@ -7240,6 +7239,9 @@
72407239
task(task&&) noexcept;
72417240
~task();
72427241

7242+
template<class Self, class... Env>
7243+
static consteval auto get_completion_signatures();
7244+
72437245
template<@\libconcept{receiver}@ Rcvr>
72447246
@\exposid{state}@<Rcvr> connect(Rcvr&& rcvr) &&;
72457247

@@ -7281,19 +7283,6 @@
72817283
contain an element which is not of the form
72827284
\tcode{set_error_t(E)} for some type \tcode{E}.
72837285

7284-
\pnum
7285-
The type alias \tcode{completion_signatures} is a specialization
7286-
of \tcode{execution::completion_signatures} with the template
7287-
arguments (in unspecified order):
7288-
\begin{itemize}
7289-
\item \tcode{set_value_t()} if \tcode{T} is \tcode{void},
7290-
and \tcode{set_value_t(T)} otherwise;
7291-
\item template arguments of the specialization of
7292-
\tcode{execution::completion_signatures} denoted by \tcode{error_types};
7293-
and
7294-
\item \tcode{set_stopped_t()}.
7295-
\end{itemize}
7296-
72977286
\pnum
72987287
\tcode{allocator_type} shall meet the \oldconcept{Allocator}
72997288
requirements.
@@ -7325,6 +7314,32 @@
73257314
\end{codeblock}
73267315
\end{itemdescr}
73277316

7317+
\indexlibrarymember{get_completion_signatures}{task}%
7318+
\begin{itemdecl}
7319+
template<class Self, class... Env>
7320+
static consteval auto get_completion_signatures();
7321+
\end{itemdecl}
7322+
\begin{itemdescr}
7323+
\pnum
7324+
Let the type \tcode{C} be a specialization
7325+
of \tcode{execution::completion_signatures}
7326+
with the template arguments (in unspecified order):
7327+
\begin{itemize}
7328+
\item
7329+
\tcode{set_value_t()} if \tcode{T} is \tcode{void},
7330+
and \tcode{set_value_t(T)} otherwise;
7331+
\item
7332+
template arguments of the specialization of
7333+
\tcode{execution::completion_signatures} denoted by \tcode{error_types};
7334+
and
7335+
\item \tcode{set_stopped_t()}.
7336+
\end{itemize}
7337+
7338+
\pnum
7339+
\returns
7340+
\tcode{C()}.
7341+
\end{itemdescr}
7342+
73287343
\indexlibrarymember{connect}{task}%
73297344
\begin{itemdecl}
73307345
template<@\libconcept{receiver}@ Rcvr>
@@ -7476,8 +7491,8 @@
74767491
template<class E>
74777492
@\unspec@ yield_value(with_error<E> error);
74787493

7479-
template<class A>
7480-
auto await_transform(A&& a);
7494+
template<@\libconcept{sender}@ Sender>
7495+
auto await_transform(Sender&& sndr);
74817496
template<class Sch>
74827497
auto await_transform(change_coroutine_scheduler<Sch> sch);
74837498

@@ -7568,7 +7583,7 @@
75687583
\tcode{set_value(std::move(\exposid{RCVR}(*this)))} if \tcode{is_void<T>} is \tcode{true},
75697584
and otherwise
75707585
\item
7571-
\tcode{set_value(std::move(\exposid{RCVR}(*this)), *\exposid{result})}.
7586+
\tcode{set_value(std::move(\exposid{RCVR}(*this)), std::move(*\exposid{result}))}.
75727587
\end{itemize}
75737588
\end{itemdescr}
75747589

@@ -7596,7 +7611,7 @@
75967611
\indexlibrarymember{await_transform}{task::promise_type}%
75977612
\begin{itemdecl}
75987613
template<@\libconcept{sender}@ Sender>
7599-
auto await_transform(Sender&& sndr) noexcept;
7614+
auto await_transform(Sender&& sndr);
76007615
\end{itemdecl}
76017616
\begin{itemdescr}
76027617
\pnum
@@ -7610,14 +7625,14 @@
76107625
\indexlibrarymember{await_transform}{task::promise_type}%
76117626
\begin{itemdecl}
76127627
template<class Sch>
7613-
auto await_transform(change_coroutine_scheduler<Sch> sch) noexcept;
7628+
auto await_transform(change_coroutine_scheduler<Sch> sch);
76147629
\end{itemdecl}
76157630
\begin{itemdescr}
76167631
\pnum
76177632
\effects
76187633
Equivalent to:
76197634
\begin{codeblock}
7620-
return await_transform(just(exchange(@\exposid{SCHED}@(*this), scheduler_type(sch.scheduler))), *this);
7635+
return as_awaitable(just(exchange(@\exposid{SCHED}@(*this), scheduler_type(sch.scheduler))), *this);
76217636
\end{codeblock}
76227637
\end{itemdescr}
76237638

source/future.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@
929929
\begin{itemdescr}
930930
\pnum
931931
\returns
932-
\tcode{system_encoded_string()}.
932+
\tcode{native_encoded_string()}.
933933
\end{itemdescr}
934934

935935
\indexlibrarymember{generic_string}{path}%
@@ -940,7 +940,7 @@
940940
\begin{itemdescr}
941941
\pnum
942942
\returns
943-
\tcode{generic_system_encoded_string()}.
943+
\tcode{generic_native_encoded_string()}.
944944
\end{itemdescr}
945945

946946
\rSec1[depr.atomics]{Deprecated atomic operations}

0 commit comments

Comments
 (0)