Skip to content

Commit c89ceed

Browse files
authored
Merge 2023-06 LWG Motion 1
P2910R0 C++ Standard Library Issues to be moved in Varna, June 2023
2 parents 2ae45e2 + 14eb0ae commit c89ceed

File tree

7 files changed

+113
-47
lines changed

7 files changed

+113
-47
lines changed

source/containers.tex

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,8 +2176,8 @@
21762176
\tcode{reference; const_reference} for constant \tcode{a}
21772177

21782178
\pnum
2179-
\returns
2180-
\tcode{*(a.begin() + n)}
2179+
\effects
2180+
Equivalent to: \tcode{return *(a.begin() + n);}
21812181

21822182
\pnum
21832183
\remarks
@@ -14758,6 +14758,11 @@
1475814758
// \ref{flat.map.cons}, construct/copy/destroy
1475914759
flat_map() : flat_map(key_compare()) { }
1476014760

14761+
template<class Allocator>
14762+
flat_map(const flat_map&, const Allocator& a);
14763+
template<class Allocator>
14764+
flat_map(flat_map&&, const Allocator& a);
14765+
1476114766
flat_map(key_container_type key_cont, mapped_container_type mapped_cont,
1476214767
const key_compare& comp = key_compare());
1476314768
template<class Allocator>
@@ -15166,6 +15171,10 @@
1516615171

1516715172
\indexlibraryctor{flat_map}%
1516815173
\begin{itemdecl}
15174+
template<class Allocator>
15175+
flat_map(const flat_map&, const Allocator& a);
15176+
template<class Allocator>
15177+
flat_map(flat_map&&, const Allocator& a);
1516915178
template<class Allocator>
1517015179
flat_map(const key_compare& comp, const Allocator& a);
1517115180
template<class Allocator>
@@ -15938,6 +15947,11 @@
1593815947
// \ref{flat.multimap.cons}, construct/copy/destroy
1593915948
flat_multimap() : flat_multimap(key_compare()) { }
1594015949

15950+
template<class Allocator>
15951+
flat_multimap(const flat_multimap&, const Allocator& a);
15952+
template<class Allocator>
15953+
flat_multimap(flat_multimap&&, const Allocator& a);
15954+
1594115955
flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont,
1594215956
const key_compare& comp = key_compare());
1594315957
template<class Allocator>
@@ -16308,6 +16322,10 @@
1630816322

1630916323
\indexlibraryctor{flat_multimap}%
1631016324
\begin{itemdecl}
16325+
template<class Allocator>
16326+
flat_multimap(const flat_multimap&, const Allocator& a);
16327+
template<class Allocator>
16328+
flat_multimap(flat_multimap&&, const Allocator& a);
1631116329
template<class Allocator>
1631216330
flat_multimap(const key_compare& comp, const Allocator& a);
1631316331
template<class Allocator>
@@ -16499,6 +16517,11 @@
1649916517
// \ref{flat.set.cons}, constructors
1650016518
flat_set() : flat_set(key_compare()) { }
1650116519

16520+
template<class Allocator>
16521+
flat_set(const flat_set&, const Allocator& a);
16522+
template<class Allocator>
16523+
flat_set(flat_set&&, const Allocator& a);
16524+
1650216525
explicit flat_set(container_type cont, const key_compare& comp = key_compare());
1650316526
template<class Allocator>
1650416527
flat_set(const container_type& cont, const Allocator& a);
@@ -16808,6 +16831,10 @@
1680816831

1680916832
\indexlibraryctor{flat_set}%
1681016833
\begin{itemdecl}
16834+
template<class Allocator>
16835+
flat_set(const flat_set&, const Allocator& a);
16836+
template<class Allocator>
16837+
flat_set(flat_set&&, const Allocator& a);
1681116838
template<class Allocator>
1681216839
flat_set(const key_compare& comp, const Allocator& a);
1681316840
template<class Allocator>
@@ -17153,6 +17180,11 @@
1715317180
// \ref{flat.multiset.cons}, constructors
1715417181
flat_multiset() : flat_multiset(key_compare()) { }
1715517182

17183+
template<class Allocator>
17184+
flat_multiset(const flat_multiset&, const Allocator& a);
17185+
template<class Allocator>
17186+
flat_multiset(flat_multiset&&, const Allocator& a);
17187+
1715617188
explicit flat_multiset(container_type cont, const key_compare& comp = key_compare());
1715717189
template<class Allocator>
1715817190
flat_multiset(const container_type& cont, const Allocator& a);
@@ -17464,6 +17496,10 @@
1746417496

1746517497
\indexlibraryctor{flat_multiset}%
1746617498
\begin{itemdecl}
17499+
template<class Allocator>
17500+
flat_multiset(const flat_multiset&, const Allocator& a);
17501+
template<class Allocator>
17502+
flat_multiset(flat_multiset&&, const Allocator& a);
1746717503
template<class Allocator>
1746817504
flat_multiset(const key_compare& comp, const Allocator& a);
1746917505
template<class Allocator>
@@ -17808,8 +17844,6 @@
1780817844
template<class OtherElementType, size_t OtherExtent>
1780917845
constexpr explicit(@\seebelow@) span(const span<OtherElementType, OtherExtent>& s) noexcept;
1781017846

17811-
~span() noexcept = default;
17812-
1781317847
constexpr span& operator=(const span& other) noexcept = default;
1781417848

1781517849
// \ref{span.sub}, subviews

source/lib-intro.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,6 +2968,7 @@
29682968
\item \indexlibraryzombie{argument_type} \tcode{argument_type},
29692969
\item \indexlibraryzombie{first_argument_type} \tcode{first_argument_type},
29702970
\item \indexlibraryzombie{io_state} \tcode{io_state},
2971+
\item \indexlibraryzombie{op} \tcode{op},
29712972
\item \indexlibraryzombie{open_mode} \tcode{open_mode},
29722973
\item \indexlibraryzombie{preferred} \tcode{preferred},
29732974
\item \indexlibraryzombie{second_argument_type} \tcode{second_argument_type},

source/numerics.tex

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
namespace std {
126126
// types
127127
using fenv_t = @\textit{object type}@;
128-
using fexcept_t = @\textit{integer type}@;
128+
using fexcept_t = @\textit{object type}@;
129129

130130
// functions
131131
int feclearexcept(int except);
@@ -500,6 +500,23 @@
500500
\tcode{*this}.
501501
\end{itemdescr}
502502

503+
\indexlibrarymember{operator=}{complex}%
504+
\begin{itemdecl}
505+
template<class X> constexpr complex& operator=(const complex<X>& rhs);
506+
\end{itemdecl}
507+
508+
\begin{itemdescr}
509+
\pnum
510+
\effects
511+
Assigns the value \tcode{rhs.real()} to the real part and
512+
the value \tcode{rhs.imag()} to the imaginary part
513+
of the complex value \tcode{*this}.
514+
515+
\pnum
516+
\returns
517+
\tcode{*this}.
518+
\end{itemdescr}
519+
503520
\indexlibrarymember{operator+=}{complex}%
504521
\begin{itemdecl}
505522
template<class X> constexpr complex& operator+=(const complex<X>& rhs);

source/ranges.tex

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@
433433
}
434434

435435
// \ref{range.enumerate}, enumerate view
436-
template<@\libconcept{input_range}@ View>
437-
requires @\libconcept{view}@<View>
436+
template<@\libconcept{view}@ V>
437+
requires @\seebelow@
438438
class enumerate_view; // freestanding
439439

440440
template<class View>
@@ -1265,14 +1265,6 @@
12651265
\end{itemdecl}
12661266

12671267
\begin{itemdescr}
1268-
\pnum
1269-
The required expressions
1270-
\tcode{ranges::begin(t)}
1271-
and
1272-
\tcode{ranges::end(t)}
1273-
of the \libconcept{range} concept
1274-
do not require implicit expression variations\iref{concepts.equality}.
1275-
12761268
\pnum
12771269
Given an expression \tcode{t} such that \tcode{decltype((t))} is \tcode{T\&},
12781270
\tcode{T} models \libconcept{range} only if
@@ -7803,8 +7795,9 @@
78037795
\begin{itemdescr}
78047796
\pnum
78057797
\effects
7806-
Initializes \exposid{parent_} with \tcode{i.\exposid{parent_}} and
7807-
\exposid{current_} with \tcode{std::move(i.\exposid{current_})}.
7798+
Initializes \exposid{parent_} with \tcode{i.\exposid{parent_}},
7799+
\exposid{current_} with \tcode{std::move(i.\exposid{current_})}, and
7800+
\exposid{trailing_empty_} with \tcode{i.\exposid{trailing_empty_}}.
78087801
\end{itemdescr}
78097802

78107803
\indexlibrarymember{operator*}{lazy_split_view::\exposid{outer-iterator}}%
@@ -9633,7 +9626,7 @@
96339626
requires @\libconcept{random_access_range}@<@\exposid{Base}@>;
96349627
friend constexpr @\exposid{iterator}@ operator-(const @\exposid{iterator}@& x, difference_type y)
96359628
requires @\libconcept{random_access_range}@<@\exposid{Base}@>;
9636-
friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y);
9629+
friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept;
96379630

96389631
friend constexpr auto iter_move(const @\exposid{iterator}@& i)
96399632
noexcept(noexcept(ranges::iter_move(i.@\exposid{current_}@)) &&
@@ -9900,7 +9893,7 @@
99009893

99019894
\indexlibrarymember{operator-}{enumerate_view::\exposid{iterator}}%
99029895
\begin{itemdecl}
9903-
friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y);
9896+
friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept;
99049897
\end{itemdecl}
99059898

99069899
\begin{itemdescr}
@@ -15957,7 +15950,7 @@
1595715950

1595815951
template<ranges::@\libconcept{input_range}@ R, class Alloc>
1595915952
requires @\libconcept{convertible_to}@<ranges::range_reference_t<R>, yielded>
15960-
auto yield_value(ranges::elements_of<R, Alloc> r) noexcept;
15953+
auto yield_value(ranges::elements_of<R, Alloc> r);
1596115954

1596215955
void await_transform() = delete;
1596315956

@@ -16121,7 +16114,7 @@
1612116114
\begin{itemdecl}
1612216115
template<ranges::@\libconcept{input_range}@ R, class Alloc>
1612316116
requires @\libconcept{convertible_to}@<ranges::range_reference_t<R>, yielded>
16124-
auto yield_value(ranges::elements_of<R, Alloc> r) noexcept;
16117+
auto yield_value(ranges::elements_of<R, Alloc> r);
1612516118
\end{itemdecl}
1612616119

1612716120
\begin{itemdescr}

source/strings.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,9 +2368,7 @@
23682368
function or operator has no other effect on the \tcode{basic_string} object.
23692369

23702370
\pnum
2371-
In every specialization \tcode{basic_string<charT, traits, Allocator>},
2372-
the type \tcode{allocator_traits<All\-ocator>::value_type} shall name the same type
2373-
as \tcode{charT}. Every object of type
2371+
Every object of type
23742372
\tcode{basic_string<charT, traits, Allocator>} uses an object of type
23752373
\tcode{Allocator} to allocate and free storage for the contained \tcode{charT}
23762374
objects as needed. The \tcode{Allocator} object used is
@@ -2383,6 +2381,8 @@
23832381
an allocator-aware container,
23842382
but does not use the allocator's \tcode{construct} and \tcode{destroy}
23852383
member functions\iref{container.requirements.pre}.
2384+
The program is ill-formed if
2385+
\tcode{Allocator::value_type} is not the same type as \tcode{charT}.
23862386
\end{note}
23872387
\begin{note}
23882388
The program is ill-formed if \tcode{traits::char_type}

source/threads.tex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4905,6 +4905,7 @@
49054905
operator shared_ptr<T>() const noexcept;
49064906
void store(shared_ptr<T> desired, memory_order order = memory_order::seq_cst) noexcept;
49074907
void operator=(shared_ptr<T> desired) noexcept;
4908+
void operator=(nullptr_t) noexcept;
49084909

49094910
shared_ptr<T> exchange(shared_ptr<T> desired,
49104911
memory_order order = memory_order::seq_cst) noexcept;
@@ -4991,6 +4992,17 @@
49914992
Equivalent to \tcode{store(desired)}.
49924993
\end{itemdescr}
49934994

4995+
\indexlibrarymember{operator=}{atomic<shared_ptr<T>>}%
4996+
\begin{itemdecl}
4997+
void operator=(nullptr_t) noexcept;
4998+
\end{itemdecl}
4999+
5000+
\begin{itemdescr}
5001+
\pnum
5002+
\effects
5003+
Equivalent to \tcode{store(nullptr)}.
5004+
\end{itemdescr}
5005+
49945006
\indexlibrarymember{load}{atomic<shared_ptr<T>>}%
49955007
\begin{itemdecl}
49965008
shared_ptr<T> load(memory_order order = memory_order::seq_cst) const noexcept;

0 commit comments

Comments
 (0)