Skip to content

Qualify all calls to std::get #5556

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4910,7 +4910,7 @@
\pnum
\effects
Initializes \tcode{v_} as if by
\tcode{v_\{in_place_index<$i$>, get<$i$>(x.v_)\}},
\tcode{v_\{in_place_index<$i$>, std::get<$i$>(x.v_)\}},
where $i$ is \tcode{x.v_.index()}.
\end{itemdescr}

Expand All @@ -4932,9 +4932,9 @@
Equivalent to:
\begin{itemize}
\item If \tcode{v_.index() == x.v_.index()}, then
\tcode{get<$i$>(v_) = get<$i$>(x.v_)}.
\tcode{std::get<$i$>(v_) = std::get<$i$>(x.v_)}.

\item Otherwise, \tcode{v_.emplace<$i$>(get<$i$>(x.v_))}.
\item Otherwise, \tcode{v_.emplace<$i$>(std::get<$i$>(x.v_))}.
\end{itemize}
where $i$ is \tcode{x.v_.index()}.

Expand All @@ -4959,7 +4959,7 @@

\pnum
\effects
Equivalent to: \tcode{return *get<I>(v_);}
Equivalent to: \tcode{return *std::get<I>(v_);}
\end{itemdescr}

\indexlibrarymember{operator->}{common_iterator}%
Expand Down Expand Up @@ -4987,19 +4987,19 @@
\begin{itemize}
\item
If \tcode{I} is a pointer type or if the expression
\tcode{get<I>(v_).operator->()} is
well-formed, equivalent to: \tcode{return get<I>(v_);}
\tcode{std::get<I>(v_).operator->()} is
well-formed, equivalent to: \tcode{return std::get<I>(v_);}

\item
Otherwise, if \tcode{iter_reference_t<I>} is a reference type, equivalent to:
\begin{codeblock}
auto&& tmp = *get<I>(v_);
auto&& tmp = *std::get<I>(v_);
return addressof(tmp);
\end{codeblock}

\item
Otherwise, equivalent to:
\tcode{return \exposid{proxy}(*get<I>(v_));} where
\tcode{return \exposid{proxy}(*std::get<I>(v_));} where
\exposid{proxy} is the exposition-only class:
\begin{codeblock}
class @\exposid{proxy}@ {
Expand Down Expand Up @@ -5029,7 +5029,7 @@

\pnum
\effects
Equivalent to \tcode{++get<I>(v_)}.
Equivalent to \tcode{++std::get<I>(v_)}.

\pnum
\returns
Expand Down Expand Up @@ -5064,7 +5064,7 @@
is \tcode{false},
equivalent to:
\begin{codeblock}
return get<I>(v_)++;
return std::get<I>(v_)++;
\end{codeblock}
Otherwise, equivalent to:
\begin{codeblock}
Expand Down Expand Up @@ -5105,7 +5105,7 @@
\pnum
\returns
\tcode{true} if \tcode{$i$ == $j$},
and otherwise \tcode{get<$i$>(x.v_) == get<$j$>(y.v_)},
and otherwise \tcode{std::get<$i$>(x.v_) == std::get<$j$>(y.v_)},
where $i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
\end{itemdescr}

Expand All @@ -5126,7 +5126,7 @@
\pnum
\returns
\tcode{true} if $i$ and $j$ are each \tcode{1}, and otherwise
\tcode{get<$i$>(x.v_) == get<$j$>(y.v_)}, where
\tcode{std::get<$i$>(x.v_) == std::get<$j$>(y.v_)}, where
$i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
\end{itemdescr}

Expand All @@ -5147,7 +5147,7 @@
\pnum
\returns
\tcode{0} if $i$ and $j$ are each \tcode{1}, and otherwise
\tcode{get<$i$>(x.v_) - get<$j$>(y.v_)}, where
\tcode{std::get<$i$>(x.v_) - std::get<$j$>(y.v_)}, where
$i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
\end{itemdescr}

Expand All @@ -5167,7 +5167,7 @@

\pnum
\effects
Equivalent to: \tcode{return ranges::iter_move(get<I>(i.v_));}
Equivalent to: \tcode{return ranges::iter_move(std::get<I>(i.v_));}
\end{itemdescr}

\indexlibrarymember{iter_swap}{common_iterator}%
Expand All @@ -5185,7 +5185,7 @@

\pnum
\effects
Equivalent to \tcode{ranges::iter_swap(get<I>(x.v_), get<I2>(y.v_))}.
Equivalent to \tcode{ranges::iter_swap(std::get<I>(x.v_), std::get<I2>(y.v_))}.
\end{itemdescr}

\rSec2[default.sentinel]{Default sentinel}
Expand Down
4 changes: 2 additions & 2 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1054,8 +1054,8 @@
Equivalent to:
\begin{codeblock}
return uses_allocator_construction_args<T>(alloc, piecewise_construct,
forward_as_tuple(get<0>(std::move(pr))),
forward_as_tuple(get<1>(std::move(pr))));
forward_as_tuple(std::get<0>(std::move(pr))),
forward_as_tuple(std::get<1>(std::move(pr))));
\end{codeblock}
\end{itemdescr}

Expand Down
2 changes: 1 addition & 1 deletion source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6970,7 +6970,7 @@
\pnum
\effects
For all \tcode{i} in \range{0}{sizeof...(MutexTypes)},
\tcode{get<i>(pm).unlock()}.
\tcode{std::get<i>(pm).unlock()}.
\end{itemdescr}

\rSec3[thread.lock.unique]{Class template \tcode{unique_lock}}
Expand Down
Loading