Skip to content

[LWG motion 9 2024-06] P2968R2 Make std::ignore a first-class object #7109

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

Merged
merged 1 commit into from
Jul 16, 2024
Merged
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
18 changes: 13 additions & 5 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,11 @@
two arguments is similar to an instantiation of \tcode{pair} with the same two arguments.
See~\ref{pairs}.

\pnum
In addition to being available via inclusion of the \libheader{tuple} header,
\tcode{ignore}\iref{tuple.syn} is available when
\libheader{utility}\iref{utility} is included.

\rSec2[tuple.syn]{Header \tcode{<tuple>} synopsis}

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

// \ref{tuple.creation}, tuple creation functions
inline constexpr @\unspec@ ignore;
// \tcode{ignore}
struct @\exposidnc{ignore-type}@ { // \expos
constexpr const @\exposid{ignore-type}@
operator=(const auto &) const noexcept { return *this; }
};
inline constexpr @\exposid{ignore-type}@ ignore;

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

Expand Down Expand Up @@ -2591,9 +2601,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{tuple<TTypes\&...>(t...)}. When an
argument in \tcode{t} is \tcode{ignore}, assigning
any value to the corresponding tuple element has no effect.
\tcode{tuple<TTypes\&...>(t...)}.

\pnum
\begin{example}
Expand Down
Loading