Skip to content

Commit 013a5e2

Browse files
[iterators.common] Exposition-only style for v_
1 parent e7a27fe commit 013a5e2

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

source/iterators.tex

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5493,7 +5493,7 @@
54935493
noexcept(noexcept(ranges::iter_swap(declval<const I&>(), declval<const I2&>())));
54945494

54955495
private:
5496-
variant<I, S> v_; // \expos
5496+
variant<I, S> @\exposid{v_}@; // \expos
54975497
};
54985498

54995499
template<class I, class S>
@@ -5552,7 +5552,7 @@
55525552
\begin{itemdescr}
55535553
\pnum
55545554
\effects
5555-
Initializes \tcode{v_} as if by \tcode{v_\{in_place_type<I>, std::move(i)\}}.
5555+
Initializes \exposid{v_} as if by \tcode{\exposid{v_}\{in_place_type<I>, std::move(i)\}}.
55565556
\end{itemdescr}
55575557

55585558
\indexlibraryctor{common_iterator}%
@@ -5563,8 +5563,8 @@
55635563
\begin{itemdescr}
55645564
\pnum
55655565
\effects
5566-
Initializes \tcode{v_} as if by
5567-
\tcode{v_\{in_place_type<S>, std::move(s)\}}.
5566+
Initializes \exposid{v_} as if by
5567+
\tcode{\exposid{v_}\{in_place_type<S>, std::move(s)\}}.
55685568
\end{itemdescr}
55695569

55705570
\indexlibraryctor{common_iterator}%
@@ -5577,13 +5577,13 @@
55775577
\begin{itemdescr}
55785578
\pnum
55795579
\hardexpects
5580-
\tcode{x.v_.valueless_by_exception()} is \tcode{false}.
5580+
\tcode{x.\exposid{v_}.valueless_by_exception()} is \tcode{false}.
55815581

55825582
\pnum
55835583
\effects
5584-
Initializes \tcode{v_} as if by
5585-
\tcode{v_\{in_place_index<$i$>, get<$i$>(x.v_)\}},
5586-
where $i$ is \tcode{x.v_.index()}.
5584+
Initializes \exposid{v_} as if by
5585+
\tcode{\exposid{v_}\{in_place_index<$i$>, get<$i$>(x.\exposid{v_})\}},
5586+
where $i$ is \tcode{x.\exposid{v_}.index()}.
55875587
\end{itemdescr}
55885588

55895589
\indexlibrarymember{operator=}{common_iterator}%
@@ -5597,18 +5597,18 @@
55975597
\begin{itemdescr}
55985598
\pnum
55995599
\hardexpects
5600-
\tcode{x.v_.valueless_by_exception()} is \tcode{false}.
5600+
\tcode{x.\exposid{v_}.valueless_by_exception()} is \tcode{false}.
56015601

56025602
\pnum
56035603
\effects
56045604
Equivalent to:
56055605
\begin{itemize}
5606-
\item If \tcode{v_.index() == x.v_.index()}, then
5607-
\tcode{get<$i$>(v_) = get<$i$>(x.v_)}.
5606+
\item If \tcode{\exposid{v_}.index() == x.\exposid{v_}.index()}, then
5607+
\tcode{get<$i$>(\exposid{v_}) = get<$i$>(x.\exposid{v_})}.
56085608

5609-
\item Otherwise, \tcode{v_.emplace<$i$>(get<$i$>(x.v_))}.
5609+
\item Otherwise, \tcode{\exposid{v_}.emplace<$i$>(get<$i$>(x.\exposid{v_}))}.
56105610
\end{itemize}
5611-
where $i$ is \tcode{x.v_.index()}.
5611+
where $i$ is \tcode{x.\exposid{v_}.index()}.
56125612

56135613
\pnum
56145614
\returns
@@ -5627,11 +5627,11 @@
56275627
\begin{itemdescr}
56285628
\pnum
56295629
\hardexpects
5630-
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
5630+
\tcode{holds_alternative<I>(\exposid{v_})} is \tcode{true}.
56315631

56325632
\pnum
56335633
\effects
5634-
Equivalent to: \tcode{return *get<I>(v_);}
5634+
Equivalent to: \tcode{return *get<I>(\exposid{v_});}
56355635
\end{itemdescr}
56365636

56375637
\indexlibrarymember{operator->}{common_iterator}%
@@ -5652,26 +5652,26 @@
56525652

56535653
\pnum
56545654
\hardexpects
5655-
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
5655+
\tcode{holds_alternative<I>(\exposid{v_})} is \tcode{true}.
56565656

56575657
\pnum
56585658
\effects
56595659
\begin{itemize}
56605660
\item
56615661
If \tcode{I} is a pointer type or if the expression
5662-
\tcode{get<I>(v_).operator->()} is
5663-
well-formed, equivalent to: \tcode{return get<I>(v_);}
5662+
\tcode{get<I>(\exposid{v_}).operator->()} is
5663+
well-formed, equivalent to: \tcode{return get<I>(\exposid{v_});}
56645664

56655665
\item
56665666
Otherwise, if \tcode{iter_reference_t<I>} is a reference type, equivalent to:
56675667
\begin{codeblock}
5668-
auto&& tmp = *get<I>(v_);
5668+
auto&& tmp = *get<I>(@\exposid{v_}@);
56695669
return addressof(tmp);
56705670
\end{codeblock}
56715671

56725672
\item
56735673
Otherwise, equivalent to:
5674-
\tcode{return \exposid{proxy}(*get<I>(v_));} where
5674+
\tcode{return \exposid{proxy}(*get<I>(\exposid{v_}));} where
56755675
\exposid{proxy} is the exposition-only class:
56765676
\begin{codeblock}
56775677
class @\exposid{proxy}@ {
@@ -5697,11 +5697,11 @@
56975697
\begin{itemdescr}
56985698
\pnum
56995699
\hardexpects
5700-
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
5700+
\tcode{holds_alternative<I>(\exposid{v_})} is \tcode{true}.
57015701

57025702
\pnum
57035703
\effects
5704-
Equivalent to \tcode{++get<I>(v_)}.
5704+
Equivalent to \tcode{++get<I>(\exposid{v_})}.
57055705

57065706
\pnum
57075707
\returns
@@ -5716,7 +5716,7 @@
57165716
\begin{itemdescr}
57175717
\pnum
57185718
\hardexpects
5719-
\tcode{holds_alternative<I>(v_)} is \tcode{true}.
5719+
\tcode{holds_alternative<I>(\exposid{v_})} is \tcode{true}.
57205720

57215721
\pnum
57225722
\effects
@@ -5736,7 +5736,7 @@
57365736
is \tcode{false},
57375737
equivalent to:
57385738
\begin{codeblock}
5739-
return get<I>(v_)++;
5739+
return get<I>(@\exposid{v_}@)++;
57405740
\end{codeblock}
57415741
Otherwise, equivalent to:
57425742
\begin{codeblock}
@@ -5771,14 +5771,14 @@
57715771
\begin{itemdescr}
57725772
\pnum
57735773
\hardexpects
5774-
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
5774+
\tcode{x.\exposid{v_}.valueless_by_exception()} and \tcode{y.\exposid{v_}.valueless_by_exception()}
57755775
are each \tcode{false}.
57765776

57775777
\pnum
57785778
\returns
57795779
\tcode{true} if \tcode{$i$ == $j$},
5780-
and otherwise \tcode{get<$i$>(x.v_) == get<$j$>(y.v_)},
5781-
where $i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
5780+
and otherwise \tcode{get<$i$>(x.\exposid{v_}) == get<$j$>(y.\exposid{v_})},
5781+
where $i$ is \tcode{x.\exposid{v_}.index()} and $j$ is \tcode{y.\exposid{v_}.index()}.
57825782
\end{itemdescr}
57835783

57845784
\indexlibrarymember{operator==}{common_iterator}%
@@ -5792,14 +5792,14 @@
57925792
\begin{itemdescr}
57935793
\pnum
57945794
\hardexpects
5795-
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
5795+
\tcode{x.\exposid{v_}.valueless_by_exception()} and \tcode{y.\exposid{v_}.valueless_by_exception()}
57965796
are each \tcode{false}.
57975797

57985798
\pnum
57995799
\returns
58005800
\tcode{true} if $i$ and $j$ are each \tcode{1}, and otherwise
5801-
\tcode{get<$i$>(x.v_) == get<$j$>(y.v_)}, where
5802-
$i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
5801+
\tcode{get<$i$>(x.\exposid{v_}) == get<$j$>(y.\exposid{v_})}, where
5802+
$i$ is \tcode{x.\exposid{v_}.index()} and $j$ is \tcode{y.\exposid{v_}.index()}.
58035803
\end{itemdescr}
58045804

58055805
\indexlibrarymember{operator-}{common_iterator}%
@@ -5813,14 +5813,14 @@
58135813
\begin{itemdescr}
58145814
\pnum
58155815
\hardexpects
5816-
\tcode{x.v_.valueless_by_exception()} and \tcode{y.v_.valueless_by_exception()}
5816+
\tcode{x.\exposid{v_}.valueless_by_exception()} and \tcode{y.\exposid{v_}.valueless_by_exception()}
58175817
are each \tcode{false}.
58185818

58195819
\pnum
58205820
\returns
58215821
\tcode{0} if $i$ and $j$ are each \tcode{1}, and otherwise
5822-
\tcode{get<$i$>(x.v_) - get<$j$>(y.v_)}, where
5823-
$i$ is \tcode{x.v_.index()} and $j$ is \tcode{y.v_.index()}.
5822+
\tcode{get<$i$>(x.\exposid{v_}) - get<$j$>(y.\exposid{v_})}, where
5823+
$i$ is \tcode{x.\exposid{v_}.index()} and $j$ is \tcode{y.\exposid{v_}.index()}.
58245824
\end{itemdescr}
58255825

58265826
\rSec3[common.iter.cust]{Customizations}
@@ -5835,11 +5835,11 @@
58355835
\begin{itemdescr}
58365836
\pnum
58375837
\hardexpects
5838-
\tcode{holds_alternative<I>(i.v_)} is \tcode{true}.
5838+
\tcode{holds_alternative<I>(i.\exposid{v_})} is \tcode{true}.
58395839

58405840
\pnum
58415841
\effects
5842-
Equivalent to: \tcode{return ranges::iter_move(get<I>(i.v_));}
5842+
Equivalent to: \tcode{return ranges::iter_move(get<I>(i.\exposid{v_}));}
58435843
\end{itemdescr}
58445844

58455845
\indexlibrarymember{iter_swap}{common_iterator}%
@@ -5852,12 +5852,12 @@
58525852
\begin{itemdescr}
58535853
\pnum
58545854
\hardexpects
5855-
\tcode{holds_alternative<I>(x.v_)} and \tcode{holds_alternative<I2>(y.v_)}
5855+
\tcode{holds_alternative<I>(x.\exposid{v_})} and \tcode{holds_alternative<I2>(y.\exposid{v_})}
58565856
are each \tcode{true}.
58575857

58585858
\pnum
58595859
\effects
5860-
Equivalent to \tcode{ranges::iter_swap(get<I>(x.v_), get<I2>(y.v_))}.
5860+
Equivalent to \tcode{ranges::iter_swap(get<I>(x.\exposid{v_}), get<I2>(y.\exposid{v_}))}.
58615861
\end{itemdescr}
58625862

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

0 commit comments

Comments
 (0)