This is an archive of the discontinued LLVM Phabricator instance.

[libc++][format] Makes format_context copyable.
ClosedPublic

Authored by Mordante on Nov 13 2022, 9:53 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG36ce0c3b1e58: [libc++][format] Makes format_context copyable.
Summary

This was a bug discovered by @jwakely.

Diff Detail

Event Timeline

Mordante created this revision.Nov 13 2022, 9:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2022, 9:53 AM
Mordante requested review of this revision.Nov 13 2022, 9:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2022, 9:53 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Nov 15 2022, 8:41 AM
ldionne added a subscriber: ldionne.

LGTM w/ a proper regression test for this issue.

libcxx/include/__format/format_context.h
88–89

Can we add tests to make sure that it is copyable iff the output iterator is copyable (which means we should also ensure it's not copyable when the output iterator isn't).

This revision is now accepted and ready to land.Nov 15 2022, 8:41 AM
Mordante updated this revision to Diff 475520.Nov 15 2022, 10:42 AM

Rebased and addresses review comments.

This revision was automatically updated to reflect the committed changes.