Skip to content
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

Fix: fmt::ostream cannot be moved while holding buffered data #2197 #2198

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

vtta
Copy link
Contributor

@vtta vtta commented Mar 29, 2021

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Comment on lines +399 to 400
other.clear();
other.set(nullptr, 0);
Copy link
Contributor

@vitaut vitaut Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this can be replaced with

other = detail::buffer<char>();

Copy link
Contributor Author

@vtta vtta Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems reasonable, but I prefer the consistency between set and clear.
Another issue is that creating an additional object in the ctor seems confusing.

@alexezeder
Copy link
Contributor

alexezeder commented Mar 29, 2021

Hmm.... @vitaut, is a line:

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

in the description of the first PR still necessary?

@vitaut vitaut merged commit 1484887 into fmtlib:master Mar 30, 2021
@vitaut
Copy link
Contributor

vitaut commented Mar 30, 2021

Hmm.... @vitaut, is a line ... in the description of the first PR still necessary?

Not really, removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants