Skip to content

P2418R2 Add support for std::generator-like types to std::format #5011

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 2 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,26 @@
// previously threw \tcode{format_error}
\end{codeblock}

\diffref{format}
\change
Signature changes: \tcode{format}, \tcode{format_to}, \tcode{format_to_n},
\tcode{formatted_size}.
\rationale
Enable formatting of views
that do not support iteration when const-qualified and
are not copyable.
\effect
Valid \CppXX{} code that passes bit fields to formatting functions
may become ill-formed. For example:
\begin{codeblock}
struct tiny {
int bit: 1;
};

auto t = tiny();
std::format("{}", t.bit); // ill-formed, previously returned \tcode{"0"}
\end{codeblock}

\rSec1[diff.cpp17]{\Cpp{} and ISO \CppXVII{}}

\rSec2[diff.cpp17.general]{General}
Expand Down
Loading