Skip to content

[charconv.to.chars] Itemize mapping of chars_format onto conversion specifiers #6846

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 1 commit 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
23 changes: 15 additions & 8 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15335,15 +15335,22 @@
\tcode{round_to_nearest}\iref{round.style}.

\pnum
The functions taking a \tcode{chars_format} parameter
determine the conversion specifier for \tcode{printf} as follows:
The conversion specifier is
\tcode{f} if \tcode{fmt} is \tcode{chars_format::fixed},
\tcode{e} if \tcode{fmt} is \tcode{chars_format::scientific},
In the functions taking a \tcode{chars_format} parameter,
the conversion specifier for \tcode{printf} is
\begin{itemize}
\item
\tcode{f}
if \tcode{fmt} is \tcode{chars_format::fixed},
\item
\tcode{e}
if \tcode{fmt} is \tcode{chars_format::scientific},
\item
\tcode{a} (without leading \tcode{"0x"} in the result)
if \tcode{fmt} is \tcode{chars_format::hex},
and
\tcode{g} if \tcode{fmt} is \tcode{chars_format::general}.
if \tcode{fmt} is \tcode{chars_format::hex}, and
\item
\tcode{g}
if \tcode{fmt} is \tcode{chars_format::general}.
\end{itemize}

\indexlibraryglobal{to_chars}%
\begin{itemdecl}
Expand Down