Skip to content

Commit 225eadc

Browse files
burblebeetkoeppe
authored andcommitted
P2968R2 Make std::ignore a first-class object
1 parent 95979bf commit 225eadc

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

source/utilities.tex

+13-5
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,11 @@
14941494
two arguments is similar to an instantiation of \tcode{pair} with the same two arguments.
14951495
See~\ref{pairs}.
14961496

1497+
\pnum
1498+
In addition to being available via inclusion of the \libheader{tuple} header,
1499+
\tcode{ignore}\iref{tuple.syn} is available when
1500+
\libheader{utility}\iref{utility} is included.
1501+
14971502
\rSec2[tuple.syn]{Header \tcode{<tuple>} synopsis}
14981503

14991504
\indexheader{tuple}%
@@ -1520,9 +1525,14 @@
15201525
template<@\exposconceptnc{tuple-like}@ TTuple, @\exposconceptnc{tuple-like}@ UTuple>
15211526
struct common_type<TTuple, UTuple>;
15221527

1523-
// \ref{tuple.creation}, tuple creation functions
1524-
inline constexpr @\unspec@ ignore;
1528+
// \tcode{ignore}
1529+
struct @\exposidnc{ignore-type}@ { // \expos
1530+
constexpr const @\exposid{ignore-type}@
1531+
operator=(const auto &) const noexcept { return *this; }
1532+
};
1533+
inline constexpr @\exposid{ignore-type}@ ignore;
15251534

1535+
// \ref{tuple.creation}, tuple creation functions
15261536
template<class... TTypes>
15271537
constexpr tuple<unwrap_ref_decay_t<TTypes>...> make_tuple(TTypes&&...);
15281538

@@ -2591,9 +2601,7 @@
25912601
\begin{itemdescr}
25922602
\pnum
25932603
\returns
2594-
\tcode{tuple<TTypes\&...>(t...)}. When an
2595-
argument in \tcode{t} is \tcode{ignore}, assigning
2596-
any value to the corresponding tuple element has no effect.
2604+
\tcode{tuple<TTypes\&...>(t...)}.
25972605

25982606
\pnum
25992607
\begin{example}

0 commit comments

Comments
 (0)