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

Fixes for g++ 4.9.x compatibility #6053

Closed
wants to merge 1 commit into from

Conversation

pdillinger
Copy link
Contributor

@pdillinger pdillinger commented Nov 19, 2019

Summary: Taken from @merryChris in #6043

Reproduced the errors using minimal code snippets on https://godbolt.org/ with -std=c++11. Did not fail in g++ 5+.

Stackoverflow ref on {{}} vs. {}:
https://stackoverflow.com/questions/26947704/implicit-conversion-failure-from-initializer-list

Note to reader: .clear() does not empty out an ostringstream, but .str("")
suffices because we don't have to worry about clearing error flags.

Test Plan: make check, manual run of filter_bench

Summary: Taken from @merryChris in facebook#6043

Stackoverflow ref on {{}} vs. {}:
https://stackoverflow.com/questions/26947704/implicit-conversion-failure-from-initializer-list

Note that .clear() does not empty out an ostringstream, but .str("")
suffices because we don't have to worry about clearing error flags.

Test Plan: make check, manual run of filter_bench
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@pdillinger has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@siying
Copy link
Contributor

siying commented Nov 19, 2019

If gcc 4.9.2 doesn't break, we should rename the pull request to avoid confusion.

@pdillinger pdillinger changed the title Fixes for g++ 4.9.2 compatibility Fixes for g++ 4.9.x compatibility Nov 19, 2019
@facebook-github-bot
Copy link
Contributor

@pdillinger merged this pull request in 0306e01.

@merryChris
Copy link

@pdillinger thanks for your job.

wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
Summary:
Taken from merryChris in facebook#6043

Stackoverflow ref on {{}} vs. {}:
https://stackoverflow.com/questions/26947704/implicit-conversion-failure-from-initializer-list

Note to reader: .clear() does not empty out an ostringstream, but .str("")
suffices because we don't have to worry about clearing error flags.
Pull Request resolved: facebook#6053

Test Plan: make check, manual run of filter_bench

Differential Revision: D18602259

Pulled By: pdillinger

fbshipit-source-id: f6190f83b8eab4e80e7c107348839edabe727841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants