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 FormatBuf implementation (#491) #493

Closed
wants to merge 2 commits into from
Closed

Fix FormatBuf implementation (#491) #493

wants to merge 2 commits into from

Conversation

effzeh
Copy link
Contributor

@effzeh effzeh commented Apr 6, 2017

Fixes #491 (and probably #480) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.

Fixes #491 (and probably #480) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.
@@ -191,3 +191,26 @@ TEST(OStreamTest, WriteToOStreamMaxSize) {
} while (size != 0);
fmt::internal::write(os, w);
}

#if __cplusplus >= 201103L
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this #if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed because operator<< defined in ostream.h is only defined in this case.

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2017

Thanks a lot for the fix, just one inline question.

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2017

Merged in 73ca994. Thanks again!

@vitaut vitaut closed this Apr 8, 2017
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.

2 participants