Skip to content

Commit adb8d1c

Browse files
authored
Merge 2025-02 LWG Motion 1
P3615R0 C++ Standard Library Issues to be moved in Hagenberg, Feb. 2025
2 parents 7578125 + 3a472e9 commit adb8d1c

9 files changed

+206
-202
lines changed

source/algorithms.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -4606,7 +4606,7 @@
46064606
\begin{itemdescr}
46074607
\pnum
46084608
\returns
4609-
The first iterator \tcode{i} in the range \range{first1}{last1 - (last2 - first2)}
4609+
The first iterator \tcode{i} in the range \crange{first1}{last1 - (last2 - first2)}
46104610
such that
46114611
for every non-negative integer \tcode{n} less than \tcode{last2 - first2}
46124612
the following corresponding conditions hold:
@@ -4644,7 +4644,7 @@
46444644
\item
46454645
\tcode{\{i, i + (last2 - first2)\}},
46464646
where \tcode{i} is
4647-
the first iterator in the range \range{first1}{last1 - (last2 - first2)}
4647+
the first iterator in the range \crange{first1}{last1 - (last2 - first2)}
46484648
such that
46494649
for every non-negative integer \tcode{n} less than \tcode{last2 - first2}
46504650
the condition
@@ -4705,7 +4705,7 @@
47054705

47064706
\pnum
47074707
\returns
4708-
The first iterator \tcode{i} in the range \range{first}{last - count}
4708+
The first iterator \tcode{i} in the range \crange{first}{last - count}
47094709
such that for every non-negative integer \tcode{n} less than \tcode{count}
47104710
the condition $E$ is \tcode{true}.
47114711
Returns \tcode{last} if no such iterator is found.
@@ -4736,7 +4736,7 @@
47364736
\pnum
47374737
\returns
47384738
\tcode{\{i, i + count\}}
4739-
where \tcode{i} is the first iterator in the range \range{first}{last - count}
4739+
where \tcode{i} is the first iterator in the range \crange{first}{last - count}
47404740
such that for every non-negative integer \tcode{n} less than \tcode{count},
47414741
the following condition holds:
47424742
\tcode{invoke(pred, invoke(proj, *(i + n)), value)}.
@@ -8098,7 +8098,7 @@
80988098
\begin{itemize}
80998099
\item
81008100
For the overloads with no \tcode{ExecutionPolicy}, and
8101-
if enough additional memory is available, exactly $N - 1$ comparisons.
8101+
if enough additional memory is available, at most $N - 1$ comparisons.
81028102
\item
81038103
Otherwise, \bigoh{N \log N} comparisons.
81048104
\end{itemize}

source/containers.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -3535,7 +3535,7 @@
35353535

35363536
\pnum
35373537
\expects
3538-
\tcode{a.get_allocator() == a2.get_allocator()}.
3538+
\tcode{a.get_allocator() == a2.get_allocator()} is \tcode{true}.
35393539

35403540
\pnum
35413541
\effects
@@ -3550,7 +3550,8 @@
35503550
\ensures
35513551
Pointers and references to the transferred elements of \tcode{a2}
35523552
refer to those same elements but as members of \tcode{a}.
3553-
Iterators referring to the transferred elements
3553+
If \tcode{a.begin()} and \tcode{a2.begin()} have the same type,
3554+
iterators referring to the transferred elements
35543555
will continue to refer to their elements,
35553556
but they now behave as iterators into \tcode{a}, not into \tcode{a2}.
35563557

source/exec.tex

+15-8
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@
101101
Otherwise, \tcode{make_exception_ptr(err)}.
102102
\end{itemize}
103103

104+
\pnum
105+
For a subexpression \tcode{expr},
106+
let \tcode{\exposid{AS-CONST}(expr)} be expression-equivalent to
107+
\begin{codeblock}
108+
[](const auto& x) noexcept -> const auto& { return x; }(expr)
109+
\end{codeblock}
110+
104111
\rSec1[exec.queryable]{Queries and queryables}
105112

106113
\rSec2[exec.queryable.general]{General}
@@ -789,7 +796,7 @@
789796
The name \tcode{get_allocator} denotes a query object.
790797
For a subexpression \tcode{env},
791798
\tcode{get_allocator(env)} is expression-equivalent to
792-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_allocator))}.
799+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_allocator))}.
793800

794801
\mandates
795802
If the expression above is well-formed,
@@ -811,7 +818,7 @@
811818
\tcode{get_stop_token(env)} is expression-equivalent to:
812819
\begin{itemize}
813820
\item
814-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_stop_token))}
821+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_stop_token))}
815822
if that expression is well-formed.
816823

817824
\mandates
@@ -833,7 +840,7 @@
833840
\tcode{execution::get_env(o)} is expression-equivalent to:
834841
\begin{itemize}
835842
\item
836-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(o).get_env())}
843+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(o).get_env())}
837844
if that expression is well-formed.
838845

839846
\mandates
@@ -864,7 +871,7 @@
864871
The name \tcode{get_domain} denotes a query object.
865872
For a subexpression \tcode{env},
866873
\tcode{get_domain(env)} is expression-equivalent to
867-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_domain))}.
874+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_domain))}.
868875

869876
\pnum
870877
\tcode{forwarding_query(execution::get_domain)} is
@@ -879,7 +886,7 @@
879886
The name \tcode{get_scheduler} denotes a query object.
880887
For a subexpression \tcode{env},
881888
\tcode{get_scheduler(env)} is expression-equivalent to
882-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_scheduler))}.
889+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_scheduler))}.
883890

884891
\mandates
885892
If the expression above is well-formed,
@@ -900,7 +907,7 @@
900907
The name \tcode{get_delegation_scheduler} denotes a query object.
901908
For a subexpression \tcode{env},
902909
\tcode{get_delegation_scheduler(env)} is expression-equivalent to
903-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_delegation_scheduler))}.
910+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_delegation_scheduler))}.
904911

905912
\mandates
906913
If the expression above is well-formed,
@@ -936,7 +943,7 @@
936943
\tcode{get_forward_progress_guarantee(sch)} is expression-equivalent to:
937944
\begin{itemize}
938945
\item
939-
\tcode{\exposid{MANDATE-NOTHROW}(as_const(sch).query(get_forward_progress_guarantee))},
946+
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(sch).query(get_forward_progress_guarantee))},
940947
if that expression is well-formed.
941948

942949
\mandates
@@ -970,7 +977,7 @@
970977
Otherwise, \tcode{get_completion_scheduler<\exposid{completion-tag}>(q)}
971978
is expression-equivalent to
972979
\begin{codeblock}
973-
@\exposid{MANDATE-NOTHROW}@(as_const(q).query(get_completion_scheduler<@\exposid{completion-tag}@>))
980+
@\exposid{MANDATE-NOTHROW}@(@\exposid{AS-CONST}@(q).query(get_completion_scheduler<@\exposid{completion-tag}@>))
974981
\end{codeblock}
975982
\mandates
976983
If the expression above is well-formed,

source/lib-intro.tex

+4-2
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,8 @@
11211121

11221122
\pnum
11231123
Whenever an unqualified name other than
1124-
\tcode{swap}, \tcode{make_error_code}, \tcode{make_error_condition}, or
1124+
\tcode{swap}, \tcode{make_error_code}, \tcode{make_error_condition},
1125+
\tcode{from_stream}, or
11251126
\tcode{submdspan_mapping}
11261127
is used in the specification of a declaration \tcode{D}
11271128
in \ref{\firstlibchapter} through \ref{\lastlibchapter} or \ref{depr},
@@ -1145,7 +1146,8 @@
11451146
in an overload resolution context
11461147
for swappable values\iref{swappable.requirements}.
11471148
The meanings of the unqualified names
1148-
\tcode{make_error_code}, \tcode{make_error_condition}, and
1149+
\tcode{make_error_code}, \tcode{make_error_condition},
1150+
\tcode{from_stream}, and
11491151
\tcode{submdspan_mapping}
11501152
are established
11511153
as-if by performing argument-dependent lookup\iref{basic.lookup.argdep}.

source/numerics.tex

+4-2
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,10 @@
12011201
Function template \tcode{pow} has additional constexpr overloads sufficient to ensure,
12021202
for a call with one argument of type \tcode{complex<T1>} and
12031203
the other argument of type \tcode{T2} or \tcode{complex<T2>},
1204-
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T2>>}.
1205-
If \tcode{common_type_t<T1, T2>} is not well-formed,
1204+
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T3>>},
1205+
where \tcode{T3} is
1206+
\tcode{double} if \tcode{T2} is an integer type and \tcode{T2} otherwise.
1207+
If \tcode{common_type_t<T1, T3>} is not well-formed,
12061208
then the program is ill-formed.
12071209

12081210
\rSec2[complex.literals]{Suffixes for complex number literals}

0 commit comments

Comments
 (0)