Skip to content

Commit 80b091d

Browse files
authored
Merge 2025-11 LWG Motion 1
P3905R0 C++ Standard Library Ready Issues to be moved in Kona, Nov. 2025
2 parents 1c3ba3b + d160bb3 commit 80b091d

File tree

14 files changed

+355
-219
lines changed

14 files changed

+355
-219
lines changed

source/algorithms.tex

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,8 @@
23552355

23562356
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
23572357
class Proj = identity, class T = projected_value_t<I, Proj>>
2358-
requires @\libconcept{indirect_binary_predicate}@<ranges::equal_to, projected<I, Proj>, const T*>
2358+
requires @\libconcept{permutable}@<I> &&
2359+
@\libconcept{indirect_binary_predicate}@<ranges::equal_to, projected<I, Proj>, const T*>
23592360
subrange<I> remove(Ep&& exec, I first, S last, const T& value,
23602361
Proj proj = {}); // freestanding-deleted
23612362
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
@@ -2377,6 +2378,7 @@
23772378

23782379
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
23792380
class Proj = identity, @\libconcept{indirect_unary_predicate}@<projected<I, Proj>> Pred>
2381+
requires @\libconcept{permutable}@<I>
23802382
subrange<I>
23812383
remove_if(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted
23822384
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
@@ -3217,6 +3219,7 @@
32173219

32183220
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
32193221
class Proj = identity, @\libconcept{indirect_unary_predicate}@<projected<I, Proj>> Pred>
3222+
requires @\libconcept{permutable}@<I>
32203223
subrange<I>
32213224
partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {}); // freestanding-deleted
32223225
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
@@ -7561,7 +7564,8 @@
75617564

75627565
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
75637566
class Proj = identity, class T = projected_value_t<I, Proj>>
7564-
requires @\libconcept{indirect_binary_predicate}@<ranges::equal_to, projected<I, Proj>, const T*>
7567+
requires @\libconcept{permutable}@<I> &&
7568+
@\libconcept{indirect_binary_predicate}@<ranges::equal_to, projected<I, Proj>, const T*>
75657569
subrange<I>
75667570
ranges::remove(Ep&& exec, I first, S last, const T& value, Proj proj = {});
75677571
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
@@ -7583,6 +7587,7 @@
75837587

75847588
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
75857589
class Proj = identity, @\libconcept{indirect_unary_predicate}@<projected<I, Proj>> Pred>
7590+
requires @\libconcept{permutable}@<I>
75867591
subrange<I>
75877592
ranges::remove_if(Ep&& exec, I first, S last, Pred pred, Proj proj = {});
75887593
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
@@ -7943,10 +7948,10 @@
79437948
\begin{itemize}
79447949
\setlength{\emergencystretch}{1em}
79457950
\item
7946-
\tcode{bool(pred(*i, *(i - 1)))}
7951+
\tcode{bool(pred(*(i - 1), *i))}
79477952
for the overloads in namespace \tcode{std};
79487953
\item
7949-
\tcode{bool(invoke(comp, invoke(proj, *i), invoke(proj, *(i - 1))))}
7954+
\tcode{bool(invoke(comp, invoke(proj, *(i - 1)), invoke(proj, *i)))}
79507955
for the overloads in namespace \tcode{ranges}.
79517956
\end{itemize}
79527957

@@ -9696,6 +9701,7 @@
96969701

96979702
template<@\exposconcept{execution-policy}@ Ep, @\libconcept{random_access_iterator}@ I, @\libconcept{sized_sentinel_for}@<I> S,
96989703
class Proj = identity, @\libconcept{indirect_unary_predicate}@<projected<I, Proj>> Pred>
9704+
requires @\libconcept{permutable}@<I>
96999705
subrange<I> ranges::partition(Ep&& exec, I first, S last, Pred pred, Proj proj = {});
97009706
template<@\exposconcept{execution-policy}@ Ep, @\exposconcept{sized-random-access-range}@ R, class Proj = identity,
97019707
@\libconcept{indirect_unary_predicate}@<projected<iterator_t<R>, Proj>> Pred>
@@ -13343,7 +13349,7 @@
1334313349
\begin{itemdescr}
1334413350
\pnum
1334513351
\constraints
13346-
\tcode{T} is an arithmetic type other than \tcode{bool}.
13352+
\tcode{T} is an arithmetic type other than \cv{}~\tcode{bool}.
1334713353

1334813354
\pnum
1334913355
\returns

source/containers.tex

Lines changed: 61 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6336,10 +6336,6 @@
63366336
In the case that \tcode{N == 0}, \tcode{begin() == end() ==} unique value.
63376337
The return value of \tcode{data()} is unspecified.
63386338

6339-
\pnum
6340-
The effect of calling \tcode{front()} or \tcode{back()} for a zero-sized array is
6341-
undefined.
6342-
63436339
\pnum
63446340
Member function \tcode{swap()} shall have a
63456341
non-throwing exception specification.
@@ -8976,7 +8972,7 @@
89768972
Equivalent to:
89778973
\begin{codeblock}
89788974
auto original_size = c.size();
8979-
for (auto i = c.begin(), last = c.end(); i != last; ) {
8975+
for (auto i = c.begin(); i != c.end(); ) {
89808976
if (pred(*i)) {
89818977
i = c.erase(i);
89828978
} else {
@@ -11573,7 +11569,7 @@
1157311569
const Allocator& = Allocator());
1157411570
constexpr map(const map& x);
1157511571
constexpr map(map&& x);
11576-
explicit map(const Allocator&);
11572+
constexpr explicit map(const Allocator&);
1157711573
constexpr map(const map&, const type_identity_t<Allocator>&);
1157811574
constexpr map(map&&, const type_identity_t<Allocator>&);
1157911575
constexpr map(initializer_list<value_type>, const Compare& = Compare(),
@@ -13450,7 +13446,8 @@
1345013446
is additional semantic information.
1345113447

1345213448
\pnum
13453-
The types \tcode{iterator} and \tcode{const_iterator} meet
13449+
The types \tcode{iterator}, \tcode{const_iterator},
13450+
\tcode{local_iterator}, and \tcode{const_local_iterator} meet
1345413451
the constexpr iterator requirements\iref{iterator.requirements.general}.
1345513452

1345613453
\indexlibraryglobal{unordered_map}%
@@ -14245,7 +14242,8 @@
1424514242
there is additional semantic information.
1424614243

1424714244
\pnum
14248-
The types \tcode{iterator} and \tcode{const_iterator} meet
14245+
The types \tcode{iterator}, \tcode{const_iterator},
14246+
\tcode{local_iterator}, and \tcode{const_local_iterator} meet
1424914247
the constexpr iterator requirements\iref{iterator.requirements.general}.
1425014248

1425114249
\indexlibraryglobal{unordered_multimap}%
@@ -14735,7 +14733,8 @@
1473514733
is additional semantic information.
1473614734

1473714735
\pnum
14738-
The types \tcode{iterator} and \tcode{const_iterator} meet
14736+
The types \tcode{iterator}, \tcode{const_iterator},
14737+
\tcode{local_iterator}, and \tcode{const_local_iterator} meet
1473914738
the constexpr iterator requirements\iref{iterator.requirements.general}.
1474014739

1474114740
\indexlibraryglobal{unordered_set}%
@@ -15155,7 +15154,8 @@
1515515154
is additional semantic information.
1515615155

1515715156
\pnum
15158-
The types \tcode{iterator} and \tcode{const_iterator} meet
15157+
The types \tcode{iterator}, \tcode{const_iterator},
15158+
\tcode{local_iterator}, and \tcode{const_local_iterator} meet
1515915159
the constexpr iterator requirements\iref{iterator.requirements.general}.
1516015160

1516115161
\indexlibraryglobal{unordered_multiset}%
@@ -15628,6 +15628,9 @@
1562815628
template<class charT, class T, @\libconcept{formattable}@<charT> Container>
1562915629
struct formatter<queue<T, Container>, charT>;
1563015630

15631+
template<class T, class Container>
15632+
constexpr bool enable_nonlocking_formatter_optimization<queue<T, Container>> = false;
15633+
1563115634
// \ref{priority.queue}, class template \tcode{priority_queue}
1563215635
template<class T, class Container = vector<T>,
1563315636
class Compare = less<typename Container::value_type>>
@@ -15642,6 +15645,10 @@
1564215645
// \ref{container.adaptors.format}, formatter specialization for \tcode{priority_queue}
1564315646
template<class charT, class T, @\libconcept{formattable}@<charT> Container, class Compare>
1564415647
struct formatter<priority_queue<T, Container, Compare>, charT>;
15648+
15649+
template<class T, class Container, class Compare>
15650+
constexpr bool
15651+
enable_nonlocking_formatter_optimization<priority_queue<T, Container, Compare>> = false;
1564515652
}
1564615653
\end{codeblock}
1564715654

@@ -16553,6 +16560,9 @@
1655316560
// \ref{container.adaptors.format}, formatter specialization for \tcode{stack}
1655416561
template<class charT, class T, @\libconcept{formattable}@<charT> Container>
1655516562
struct formatter<stack<T, Container>, charT>;
16563+
16564+
template<class T, class Container>
16565+
constexpr bool enable_nonlocking_formatter_optimization<stack<T, Container>> = false;
1655616566
}
1655716567
\end{codeblock}
1655816568

@@ -19041,7 +19051,7 @@
1904119051
constexpr container_type extract() &&;
1904219052
constexpr void replace(container_type&&);
1904319053

19044-
constexpr iterator erase(iterator position);
19054+
constexpr iterator erase(iterator position) requires (!@\libconcept{same_as}@<iterator, const_iterator>);
1904519055
constexpr iterator erase(const_iterator position);
1904619056
constexpr size_type erase(const key_type& x);
1904719057
template<class K> constexpr size_type erase(K&& x);
@@ -19712,7 +19722,7 @@
1971219722
constexpr container_type extract() &&;
1971319723
constexpr void replace(container_type&&);
1971419724

19715-
constexpr iterator erase(iterator position);
19725+
constexpr iterator erase(iterator position) requires (!@\libconcept{same_as}@<iterator, const_iterator>);
1971619726
constexpr iterator erase(const_iterator position);
1971719727
constexpr size_type erase(const key_type& x);
1971819728
template<class K> constexpr size_type erase(K&& x);
@@ -20161,6 +20171,10 @@
2016120171
The header \libheaderref{mdspan} defines the class template \tcode{mdspan} and
2016220172
other facilities for interacting with these multidimensional views.
2016320173

20174+
\pnum
20175+
In addition to being available via inclusion of the \libheaderref{span} header,
20176+
\tcode{dynamic_extent} is available when the header \libheaderref{mdspan} is included.
20177+
2016420178
\rSec2[views.contiguous]{Contiguous access}
2016520179

2016620180
\rSec3[span.syn]{Header \tcode{<span>} synopsis}%
@@ -20177,7 +20191,7 @@
2017720191
template<class T>
2017820192
concept @\defexposconcept{integral-constant-like}@ = // \expos
2017920193
is_integral_v<remove_cvref_t<decltype(T::value)>> &&
20180-
!is_same_v<bool, remove_const_t<decltype(T::value)>> &&
20194+
!is_same_v<bool, remove_cvref_t<decltype(T::value)>> &&
2018120195
@\libconcept{convertible_to}@<T, decltype(T::value)> &&
2018220196
@\libconcept{equality_comparable_with}@<T, decltype(T::value)> &&
2018320197
bool_constant<T() == T::value>::value &&
@@ -20644,7 +20658,7 @@
2064420658

2064520659
\pnum
2064620660
\effects
20647-
Equivalent to: \tcode{return R\{data(), Count\};}
20661+
Equivalent to: \tcode{return R(data(), Count);}
2064820662
where \tcode{R} is the return type.
2064920663
\end{itemdescr}
2065020664

@@ -20664,7 +20678,7 @@
2066420678

2066520679
\pnum
2066620680
\effects
20667-
Equivalent to: \tcode{return R\{data() + (size() - Count), Count\};}
20681+
Equivalent to: \tcode{return R(data() + (size() - Count), Count);}
2066820682
where \tcode{R} is the return type.
2066920683
\end{itemdescr}
2067020684

@@ -20719,7 +20733,8 @@
2071920733

2072020734
\pnum
2072120735
\effects
20722-
Equivalent to: \tcode{return \{data(), count\};}
20736+
Equivalent to: \tcode{return R(data(), count);}
20737+
where \tcode{R} is the return type.
2072320738
\end{itemdescr}
2072420739

2072520740
\indexlibrarymember{span}{last}%
@@ -20734,7 +20749,8 @@
2073420749

2073520750
\pnum
2073620751
\effects
20737-
Equivalent to: \tcode{return \{data() + (size() - count), count\};}
20752+
Equivalent to: \tcode{return R(data() + (size() - count), count);}
20753+
where \tcode{R} is the return type.
2073820754
\end{itemdescr}
2073920755

2074020756
\indexlibrarymember{span}{subspan}%
@@ -20755,8 +20771,9 @@
2075520771
\effects
2075620772
Equivalent to:
2075720773
\begin{codeblock}
20758-
return {data() + offset, count == dynamic_extent ? size() - offset : count};
20774+
return R(data() + offset, count == dynamic_extent ? size() - offset : count);
2075920775
\end{codeblock}
20776+
where \tcode{R} is the return type.
2076020777
\end{itemdescr}
2076120778

2076220779
\rSec4[span.obs]{Observers}
@@ -20959,6 +20976,10 @@
2095920976
\end{itemdecl}
2096020977

2096120978
\begin{itemdescr}
20979+
\pnum
20980+
\constraints
20981+
\tcode{is_volatile_v<ElementType>} is \tcode{false}.
20982+
2096220983
\pnum
2096320984
\effects
2096420985
Equivalent to: \tcode{return R\{reinterpret_cast<const byte*>(s.data()), s.size_bytes()\};}
@@ -20975,7 +20996,8 @@
2097520996
\begin{itemdescr}
2097620997
\pnum
2097720998
\constraints
20978-
\tcode{is_const_v<ElementType>} is \tcode{false}.
20999+
\tcode{is_const_v<ElementType>} is \tcode{false} and
21000+
\tcode{is_volatile_v<ElementType>} is \tcode{false}.
2097921001

2098021002
\pnum
2098121003
\effects
@@ -21246,7 +21268,7 @@
2124621268
\effects
2124721269
\begin{itemize}
2124821270
\item
21249-
If \tcode{OtherIndexType} is an integral type other than \tcode{bool},
21271+
If \tcode{remove_cvref_t<OtherIndexType>} is an integral type other than \tcode{bool},
2125021272
then equivalent to \tcode{return i;},
2125121273
\item
2125221274
otherwise, equivalent to \tcode{return static_cast<index_type>(i);}.
@@ -22600,7 +22622,7 @@
2260022622
constexpr index_type operator()(Indices...) const noexcept;
2260122623

2260222624
static constexpr bool is_always_unique() noexcept { return true; }
22603-
static constexpr bool is_always_exhaustive() noexcept { return false; }
22625+
static constexpr bool is_always_exhaustive() noexcept;
2260422626
static constexpr bool is_always_strided() noexcept { return true; }
2260522627

2260622628
static constexpr bool is_unique() noexcept { return true; }
@@ -22883,6 +22905,20 @@
2288322905
\end{codeblock}
2288422906
\end{itemdescr}
2288522907

22908+
\indexlibrarymember{is_always_exhaustive}{layout_stride::mapping}%
22909+
\begin{itemdecl}
22910+
static constexpr bool is_always_exhaustive() noexcept;
22911+
\end{itemdecl}
22912+
22913+
\begin{itemdescr}
22914+
\pnum
22915+
\returns
22916+
\tcode{true} if \exposid{rank_} is 0
22917+
or if there is a rank index \tcode{r} of \tcode{extents()}
22918+
such that \tcode{extents_type::sta\-tic_extent(r)} is 0,
22919+
otherwise \tcode{false}.
22920+
\end{itemdescr}
22921+
2288622922
\indexlibrarymember{is_exhaustive}{layout_stride::mapping}%
2288722923
\begin{itemdecl}
2288822924
constexpr bool is_exhaustive() const noexcept;
@@ -22893,7 +22929,8 @@
2289322929
\returns
2289422930
\begin{itemize}
2289522931
\item
22896-
\tcode{true} if \exposid{rank_} is 0.
22932+
\tcode{true} if \exposid{rank_} or the size of the multidimensional index space
22933+
\tcode{m.extents()} is 0.
2289722934
\item
2289822935
Otherwise, \tcode{true} if there is
2289922936
a permutation $P$ of the integers in the range $[0, \exposid{rank_})$
@@ -23058,6 +23095,7 @@
2305823095
then the size of the multidimensional index space \tcode{Extents()}
2305923096
is representable as a value of type \tcode{index_type}.
2306023097
\item
23098+
If \tcode{padding_value} is not equal to \tcode{dynamic_extent}, then
2306123099
\tcode{padding_value} is representable as a value of type \tcode{index_type}.
2306223100
\item
2306323101
If
@@ -23684,6 +23722,7 @@
2368423722
then the size of the multidimensional index space \tcode{Extents()}
2368523723
is representable as a value of type \tcode{index_type}.
2368623724
\item
23725+
If \tcode{padding_value} is not equal to \tcode{dynamic_extent}, then
2368723726
\tcode{padding_value} is representable as a value of type \tcode{index_type}.
2368823727
\item
2368923728
If

0 commit comments

Comments
 (0)