Skip to content

Commit 5433370

Browse files
committed
Qualify all calls to std::get
There have been some discussions and confusion about whether `std::get` can be specialized for user types. It can't, it's not a customization point and the standard always calls it qualified. As the issue has come around a few times, the standard should make it clear that this calls is always qualified, like it does for std::move and std::forward.
1 parent 0e35683 commit 5433370

File tree

6 files changed

+81
-81
lines changed

6 files changed

+81
-81
lines changed

source/declarations.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -6774,9 +6774,9 @@
67746774
that is a function template whose first template parameter
67756775
is a non-type parameter,
67766776
the initializer is
6777-
\tcode{\exposidnc{e}.get<i>()}. Otherwise, the initializer is \tcode{get<i>(\exposid{e})},
6777+
\tcode{\exposidnc{e}.std::get<i>()}. Otherwise, the initializer is \tcode{std::get<i>(\exposid{e})},
67786778
where \tcode{get} undergoes argument-dependent lookup\iref{basic.lookup.argdep}.
6779-
In either case, \tcode{get<i>} is interpreted as a \grammarterm{template-id}.
6779+
In either case, \tcode{std::get<i>} is interpreted as a \grammarterm{template-id}.
67806780
\begin{note}
67816781
Ordinary unqualified lookup\iref{basic.lookup.unqual} is not performed.
67826782
\end{note}

source/iterators.tex

+15-15
Original file line numberDiff line numberDiff line change
@@ -4910,7 +4910,7 @@
49104910
\pnum
49114911
\effects
49124912
Initializes \tcode{v_} as if by
4913-
\tcode{v_\{in_place_index<$i$>, get<$i$>(x.v_)\}},
4913+
\tcode{v_\{in_place_index<$i$>, std::get<$i$>(x.v_)\}},
49144914
where $i$ is \tcode{x.v_.index()}.
49154915
\end{itemdescr}
49164916

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

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

@@ -4959,7 +4959,7 @@
49594959

49604960
\pnum
49614961
\effects
4962-
Equivalent to: \tcode{return *get<I>(v_);}
4962+
Equivalent to: \tcode{return *std::get<I>(v_);}
49634963
\end{itemdescr}
49644964

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

49934993
\item
49944994
Otherwise, if \tcode{iter_reference_t<I>} is a reference type, equivalent to:
49954995
\begin{codeblock}
4996-
auto&& tmp = *get<I>(v_);
4996+
auto&& tmp = *std::get<I>(v_);
49974997
return addressof(tmp);
49984998
\end{codeblock}
49994999

50005000
\item
50015001
Otherwise, equivalent to:
5002-
\tcode{return \exposid{proxy}(*get<I>(v_));} where
5002+
\tcode{return \exposid{proxy}(*std::get<I>(v_));} where
50035003
\exposid{proxy} is the exposition-only class:
50045004
\begin{codeblock}
50055005
class @\exposid{proxy}@ {
@@ -5029,7 +5029,7 @@
50295029

50305030
\pnum
50315031
\effects
5032-
Equivalent to \tcode{++get<I>(v_)}.
5032+
Equivalent to \tcode{++std::get<I>(v_)}.
50335033

50345034
\pnum
50355035
\returns
@@ -5064,7 +5064,7 @@
50645064
is \tcode{false},
50655065
equivalent to:
50665066
\begin{codeblock}
5067-
return get<I>(v_)++;
5067+
return std::get<I>(v_)++;
50685068
\end{codeblock}
50695069
Otherwise, equivalent to:
50705070
\begin{codeblock}
@@ -5105,7 +5105,7 @@
51055105
\pnum
51065106
\returns
51075107
\tcode{true} if \tcode{$i$ == $j$},
5108-
and otherwise \tcode{get<$i$>(x.v_) == get<$j$>(y.v_)},
5108+
and otherwise \tcode{std::get<$i$>(x.v_) == std::get<$j$>(y.v_)},
51095109
where $i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
51105110
\end{itemdescr}
51115111

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

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

@@ -5167,7 +5167,7 @@
51675167

51685168
\pnum
51695169
\effects
5170-
Equivalent to: \tcode{return ranges::iter_move(get<I>(i.v_));}
5170+
Equivalent to: \tcode{return ranges::iter_move(std::get<I>(i.v_));}
51715171
\end{itemdescr}
51725172

51735173
\indexlibrarymember{iter_swap}{common_iterator}%
@@ -5185,7 +5185,7 @@
51855185

51865186
\pnum
51875187
\effects
5188-
Equivalent to \tcode{ranges::iter_swap(get<I>(x.v_), get<I2>(y.v_))}.
5188+
Equivalent to \tcode{ranges::iter_swap(std::get<I>(x.v_), std::get<I2>(y.v_))}.
51895189
\end{itemdescr}
51905190

51915191
\rSec2[default.sentinel]{Default sentinel}

source/memory.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@
10541054
Equivalent to:
10551055
\begin{codeblock}
10561056
return uses_allocator_construction_args<T>(alloc, piecewise_construct,
1057-
forward_as_tuple(get<0>(std::move(pr))),
1058-
forward_as_tuple(get<1>(std::move(pr))));
1057+
forward_as_tuple(std::get<0>(std::move(pr))),
1058+
forward_as_tuple(std::get<1>(std::move(pr))));
10591059
\end{codeblock}
10601060
\end{itemdescr}
10611061

source/ranges.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -8961,7 +8961,7 @@
89618961
\item
89628962
Otherwise, \tcode{true}
89638963
if there exists an integer $0 \leq i < \tcode{sizeof...(Views)}$
8964-
such that \tcode{bool(std::\brk{}get<$i$>(x.\exposid{current_}) ==
8964+
such that \tcode{bool(std::\brk{}std::get<$i$>(x.\exposid{current_}) ==
89658965
std::get<$i$>(y.\exposid{current_}))} is \tcode{true}.
89668966
\begin{note}
89678967
This allows \tcode{zip_view} to model \libconcept{common_range}

source/threads.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -6970,7 +6970,7 @@
69706970
\pnum
69716971
\effects
69726972
For all \tcode{i} in \range{0}{sizeof...(MutexTypes)},
6973-
\tcode{get<i>(pm).unlock()}.
6973+
\tcode{std::get<i>(pm).unlock()}.
69746974
\end{itemdescr}
69756975

69766976
\rSec3[thread.lock.unique]{Class template \tcode{unique_lock}}

0 commit comments

Comments
 (0)