Skip to content

[format.arg] Apply \exposid consistently #6007

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 6 commits into
base: main
Choose a base branch
from
Open
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
86 changes: 43 additions & 43 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16298,27 +16298,27 @@
class handle;

private:
using char_type = typename Context::char_type; // \expos
using @\exposid{char-type}@ = typename Context::char_type; // \expos

variant<monostate, bool, char_type,
variant<monostate, bool, @\exposid{char-type}@,
int, unsigned int, long long int, unsigned long long int,
float, double, long double,
const char_type*, basic_string_view<char_type>,
const void*, handle> value; // \expos
const @\exposid{char-type}@*, basic_string_view<@\exposid{char-type}@>,
const void*, handle> @\exposid{value_}@; // \expos

template<class T> explicit basic_format_arg(T&& v) noexcept; // \expos
explicit basic_format_arg(float n) noexcept; // \expos
explicit basic_format_arg(double n) noexcept; // \expos
explicit basic_format_arg(long double n) noexcept; // \expos
explicit basic_format_arg(const char_type* s); // \expos
explicit basic_format_arg(const @\exposid{char-type}@* s); // \expos

template<class traits>
explicit basic_format_arg(
basic_string_view<char_type, traits> s) noexcept; // \expos
basic_string_view<@\exposid{char-type}@, traits> s) noexcept; // \expos

template<class traits, class Allocator>
explicit basic_format_arg(
const basic_string<char_type, traits, Allocator>& s) noexcept; // \expos
const basic_string<@\exposid{char-type}@, traits, Allocator>& s) noexcept; // \expos

explicit basic_format_arg(nullptr_t) noexcept; // \expos

Expand Down Expand Up @@ -16378,31 +16378,31 @@
\effects
\begin{itemize}
\item
if \tcode{T} is \tcode{bool} or \tcode{char_type},
initializes \tcode{value} with \tcode{v};
if \tcode{T} is \tcode{bool} or \tcode{\exposid{char-type}},
initializes \exposid{value_} with \tcode{v};
\item
otherwise, if \tcode{T} is \tcode{char} and \tcode{char_type} is
\keyword{wchar_t}, initializes \tcode{value} with
otherwise, if \tcode{T} is \tcode{char} and \tcode{\exposid{char-type}} is
\keyword{wchar_t}, initializes \exposid{value_} with
\tcode{static_cast<wchar_t>(v)};
\item
otherwise, if \tcode{T} is a signed integer type\iref{basic.fundamental}
and \tcode{sizeof(T) <= sizeof(int)},
initializes \tcode{value} with \tcode{static_cast<int>(v)};
initializes \exposid{value_} with \tcode{static_cast<int>(v)};
\item
otherwise, if \tcode{T} is an unsigned integer type and
\tcode{sizeof(T) <= sizeof(unsigned int)}, initializes
\tcode{value} with \tcode{static_cast<unsigned int>(v)};
\exposid{value_} with \tcode{static_cast<unsigned int>(v)};
\item
otherwise, if \tcode{T} is a signed integer type and
\tcode{sizeof(T) <= sizeof(long long int)}, initializes
\tcode{value} with \tcode{static_cast<long long int>(v)};
\exposid{value_} with \tcode{static_cast<long long int>(v)};
\item
otherwise, if \tcode{T} is an unsigned integer type and
\tcode{sizeof(T) <= sizeof(unsigned long long int)}, initializes
\tcode{value} with
\exposid{value_} with
\tcode{static_cast<unsigned long long int>(v)};
\item
otherwise, initializes \tcode{value} with \tcode{handle(v)}.
otherwise, initializes \exposid{value_} with \tcode{handle(v)}.
\end{itemize}
\end{itemdescr}

Expand All @@ -16415,11 +16415,11 @@
\begin{itemdescr}
\pnum
\effects
Initializes \tcode{value} with \tcode{n}.
Initializes \exposid{value_} with \tcode{n}.
\end{itemdescr}

\begin{itemdecl}
explicit basic_format_arg(const char_type* s);
explicit basic_format_arg(const @\exposid{char-type}@* s);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -16429,32 +16429,32 @@

\pnum
\effects
Initializes \tcode{value} with \tcode{s}.
Initializes \exposid{value_} with \tcode{s}.
\end{itemdescr}

\begin{itemdecl}
template<class traits>
explicit basic_format_arg(basic_string_view<char_type, traits> s) noexcept;
explicit basic_format_arg(basic_string_view<@\exposid{char-type}@, traits> s) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Initializes \tcode{value} with
\tcode{basic_string_view<char_type>(s.data(), s.size())}.
Initializes \exposid{value_} with
\tcode{basic_string_view<\exposid{char-type}>(s.data(), s.size())}.
\end{itemdescr}

\begin{itemdecl}
template<class traits, class Allocator>
explicit basic_format_arg(
const basic_string<char_type, traits, Allocator>& s) noexcept;
const basic_string<@\exposid{char-type}@, traits, Allocator>& s) noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Initializes \tcode{value} with
\tcode{basic_string_view<char_type>(s.data(), s.size())}.
Initializes \exposid{value_} with
\tcode{basic_string_view<\exposid{char-type}>(s.data(), s.size())}.
\end{itemdescr}

\begin{itemdecl}
Expand All @@ -16464,7 +16464,7 @@
\begin{itemdescr}
\pnum
\effects
Initializes \tcode{value} with
Initializes \exposid{value_} with
\tcode{static_cast<const void*>(nullptr)}.
\end{itemdescr}

Expand All @@ -16479,7 +16479,7 @@

\pnum
\effects
Initializes \tcode{value} with \tcode{p}.
Initializes \exposid{value_} with \tcode{p}.

\pnum
\begin{note}
Expand All @@ -16499,7 +16499,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{!holds_alternative<monostate>(value)}.
\tcode{!holds_alternative<monostate>(\exposid{value_})}.
\end{itemdescr}

\pnum
Expand All @@ -16511,16 +16511,16 @@
namespace std {
template<class Context>
class basic_format_arg<Context>::handle {
const void* ptr_; // \expos
void (*format_)(basic_format_parse_context<char_type>&,
const void* @\exposid{ptr_}@; // \expos
void (*@\exposid{format_}@)(basic_format_parse_context<\exposid{char-type}>&,
Context&, const void*); // \expos

template<class T> explicit handle(T&& val) noexcept; // \expos

friend class basic_format_arg<Context>; // \expos

public:
void format(basic_format_parse_context<char_type>&, Context& ctx) const;
void format(basic_format_parse_context<@\exposid{char-type}@>&, Context& ctx) const;
};
}
\end{codeblock}
Expand Down Expand Up @@ -16552,10 +16552,10 @@
\pnum
\effects
Initializes
\tcode{ptr_} with \tcode{addressof(val)} and
\tcode{format_} with
\tcode{\exposid{ptr_}} with \tcode{addressof(val)} and
\tcode{\exposid{format_}} with
\begin{codeblock}
[](basic_format_parse_context<char_type>& parse_ctx,
[](basic_format_parse_context<@\exposid{char-type}@>& parse_ctx,
Context& format_ctx, const void* ptr) {
typename Context::template formatter_type<TD> f;
parse_ctx.advance_to(f.parse(parse_ctx));
Expand All @@ -16567,13 +16567,13 @@

\indexlibrarymember{format}{basic_format_arg::handle}%
\begin{itemdecl}
void format(basic_format_parse_context<char_type>& parse_ctx, Context& format_ctx) const;
void format(basic_format_parse_context<@\exposid{char-type}@>& parse_ctx, Context& format_ctx) const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{format_(parse_ctx, format_ctx, ptr_);}
Equivalent to: \tcode{\exposid{format_}(parse_ctx, format_ctx, \exposid{ptr_});}
\end{itemdescr}

\indexlibraryglobal{visit_format_arg}%
Expand All @@ -16585,7 +16585,7 @@
\begin{itemdescr}
\pnum
\effects
Equivalent to: \tcode{return visit(forward<Visitor>(vis), arg.value);}
Equivalent to: \tcode{return visit(forward<Visitor>(vis), arg.\exposid{value_});}
\end{itemdescr}

\rSec3[format.arg.store]{Class template \exposid{format-arg-store}}
Expand Down Expand Up @@ -16642,8 +16642,8 @@
namespace std {
template<class Context>
class basic_format_args {
size_t size_; // \expos
const basic_format_arg<Context>* data_; // \expos
size_t using @\exposid{size_}@; // \expos
const basic_format_arg<Context>* using @\exposid{data_}@; // \expos

public:
basic_format_args() noexcept;
Expand Down Expand Up @@ -16675,7 +16675,7 @@
\begin{itemdescr}
\pnum
\effects
Initializes \tcode{size_} with \tcode{0}.
Initializes \exposid{size_} with \tcode{0}.
\end{itemdescr}

\indexlibraryctor{basic_format_args}%
Expand All @@ -16688,8 +16688,8 @@
\pnum
\effects
Initializes
\tcode{size_} with \tcode{sizeof...(Args)} and
\tcode{data_} with \tcode{store.args.data()}.
\exposid{size_} with \tcode{sizeof...(Args)} and
\exposid{data_} with \tcode{store.args.data()}.
\end{itemdescr}

\indexlibrarymember{get}{basic_format_args}%
Expand All @@ -16700,7 +16700,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{i < size_ ?\ data_[i] :\ basic_format_arg<Context>()}.
\tcode{i < \exposid{size_} ?\ \exposid{data_}[i] :\ basic_format_arg<Context>()}.
\end{itemdescr}

\rSec2[format.tuple]{Tuple formatter}
Expand Down