Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2025-02 LWG 1] P3615R0 C++ Standard Library Ready Issues #7648

Merged
merged 9 commits into from
Mar 15, 2025
10 changes: 5 additions & 5 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4606,7 +4606,7 @@
\begin{itemdescr}
\pnum
\returns
The first iterator \tcode{i} in the range \range{first1}{last1 - (last2 - first2)}
The first iterator \tcode{i} in the range \crange{first1}{last1 - (last2 - first2)}
such that
for every non-negative integer \tcode{n} less than \tcode{last2 - first2}
the following corresponding conditions hold:
Expand Down Expand Up @@ -4644,7 +4644,7 @@
\item
\tcode{\{i, i + (last2 - first2)\}},
where \tcode{i} is
the first iterator in the range \range{first1}{last1 - (last2 - first2)}
the first iterator in the range \crange{first1}{last1 - (last2 - first2)}
such that
for every non-negative integer \tcode{n} less than \tcode{last2 - first2}
the condition
Expand Down Expand Up @@ -4705,7 +4705,7 @@

\pnum
\returns
The first iterator \tcode{i} in the range \range{first}{last - count}
The first iterator \tcode{i} in the range \crange{first}{last - count}
such that for every non-negative integer \tcode{n} less than \tcode{count}
the condition $E$ is \tcode{true}.
Returns \tcode{last} if no such iterator is found.
Expand Down Expand Up @@ -4736,7 +4736,7 @@
\pnum
\returns
\tcode{\{i, i + count\}}
where \tcode{i} is the first iterator in the range \range{first}{last - count}
where \tcode{i} is the first iterator in the range \crange{first}{last - count}
such that for every non-negative integer \tcode{n} less than \tcode{count},
the following condition holds:
\tcode{invoke(pred, invoke(proj, *(i + n)), value)}.
Expand Down Expand Up @@ -8098,7 +8098,7 @@
\begin{itemize}
\item
For the overloads with no \tcode{ExecutionPolicy}, and
if enough additional memory is available, exactly $N - 1$ comparisons.
if enough additional memory is available, at most $N - 1$ comparisons.
\item
Otherwise, \bigoh{N \log N} comparisons.
\end{itemize}
Expand Down
5 changes: 3 additions & 2 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,7 @@

\pnum
\expects
\tcode{a.get_allocator() == a2.get_allocator()}.
\tcode{a.get_allocator() == a2.get_allocator()} is \tcode{true}.

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

Expand Down
23 changes: 15 additions & 8 deletions source/exec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@
Otherwise, \tcode{make_exception_ptr(err)}.
\end{itemize}

\pnum
For a subexpression \tcode{expr},
let \tcode{\exposid{AS-CONST}(expr)} be expression-equivalent to
\begin{codeblock}
[](const auto& x) noexcept -> const auto& { return x; }(expr)
\end{codeblock}

\rSec1[exec.queryable]{Queries and queryables}

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

\mandates
If the expression above is well-formed,
Expand All @@ -811,7 +818,7 @@
\tcode{get_stop_token(env)} is expression-equivalent to:
\begin{itemize}
\item
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_stop_token))}
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_stop_token))}
if that expression is well-formed.

\mandates
Expand All @@ -833,7 +840,7 @@
\tcode{execution::get_env(o)} is expression-equivalent to:
\begin{itemize}
\item
\tcode{\exposid{MANDATE-NOTHROW}(as_const(o).get_env())}
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(o).get_env())}
if that expression is well-formed.

\mandates
Expand Down Expand Up @@ -864,7 +871,7 @@
The name \tcode{get_domain} denotes a query object.
For a subexpression \tcode{env},
\tcode{get_domain(env)} is expression-equivalent to
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_domain))}.
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_domain))}.

\pnum
\tcode{forwarding_query(execution::get_domain)} is
Expand All @@ -879,7 +886,7 @@
The name \tcode{get_scheduler} denotes a query object.
For a subexpression \tcode{env},
\tcode{get_scheduler(env)} is expression-equivalent to
\tcode{\exposid{MANDATE-NOTHROW}(as_const(env).query(get_scheduler))}.
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(env).query(get_scheduler))}.

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

\mandates
If the expression above is well-formed,
Expand Down Expand Up @@ -936,7 +943,7 @@
\tcode{get_forward_progress_guarantee(sch)} is expression-equivalent to:
\begin{itemize}
\item
\tcode{\exposid{MANDATE-NOTHROW}(as_const(sch).query(get_forward_progress_guarantee))},
\tcode{\exposid{MANDATE-NOTHROW}(\exposid{AS-CONST}(sch).query(get_forward_progress_guarantee))},
if that expression is well-formed.

\mandates
Expand Down Expand Up @@ -970,7 +977,7 @@
Otherwise, \tcode{get_completion_scheduler<\exposid{completion-tag}>(q)}
is expression-equivalent to
\begin{codeblock}
@\exposid{MANDATE-NOTHROW}@(as_const(q).query(get_completion_scheduler<@\exposid{completion-tag}@>))
@\exposid{MANDATE-NOTHROW}@(@\exposid{AS-CONST}@(q).query(get_completion_scheduler<@\exposid{completion-tag}@>))
\end{codeblock}
\mandates
If the expression above is well-formed,
Expand Down
6 changes: 4 additions & 2 deletions source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,8 @@

\pnum
Whenever an unqualified name other than
\tcode{swap}, \tcode{make_error_code}, \tcode{make_error_condition}, or
\tcode{swap}, \tcode{make_error_code}, \tcode{make_error_condition},
\tcode{from_stream}, or
\tcode{submdspan_mapping}
is used in the specification of a declaration \tcode{D}
in \ref{\firstlibchapter} through \ref{\lastlibchapter} or \ref{depr},
Expand All @@ -1145,7 +1146,8 @@
in an overload resolution context
for swappable values\iref{swappable.requirements}.
The meanings of the unqualified names
\tcode{make_error_code}, \tcode{make_error_condition}, and
\tcode{make_error_code}, \tcode{make_error_condition},
\tcode{from_stream}, and
\tcode{submdspan_mapping}
are established
as-if by performing argument-dependent lookup\iref{basic.lookup.argdep}.
Expand Down
6 changes: 4 additions & 2 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1201,8 +1201,10 @@
Function template \tcode{pow} has additional constexpr overloads sufficient to ensure,
for a call with one argument of type \tcode{complex<T1>} and
the other argument of type \tcode{T2} or \tcode{complex<T2>},
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T2>>}.
If \tcode{common_type_t<T1, T2>} is not well-formed,
both arguments are effectively cast to \tcode{complex<common_type_t<T1, T3>>},
where \tcode{T3} is
\tcode{double} if \tcode{T2} is an integer type and \tcode{T2} otherwise.
If \tcode{common_type_t<T1, T3>} is not well-formed,
then the program is ill-formed.

\rSec2[complex.literals]{Suffixes for complex number literals}
Expand Down
Loading