-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Resolve issues with streams (getline(), stream to void *, etc) #11309
Resolve issues with streams (getline(), stream to void *, etc) #11309
Conversation
GCC 5.2.0 does not allow piping output stream into output stream, e.g., `std::cout << std::cout`. There is no more impilicit conversion to `void *` since C++11. `std::getline()` returns `std::basic_istream` and implicit conversion to `void *` does not happen. Since C++11 you can use any function returning references to streams as loop conditions. This is because `explicit operator bool() const` was introduced since C++11. To validate stream status you need to use `operator!`, `fail()`, `eof()`, `bad()` and friends from `std::basic_ios`. Signed-off-by: David Abdurachmanov <[email protected]>
A new Pull Request was created by @davidlt for CMSSW_7_6_X. Resolve issues with streams (getline(), stream to void *, etc) It involves the following packages: Alignment/CommonAlignmentProducer @diguida, @cerminar, @cmsbuild, @ggovi, @mmusich, @mulhearn can you please review it and eventually sign? Thanks. |
please test |
The tests are being triggered in jenkins. |
+1 |
+1 |
Resolve issues with streams (getline(), stream to void *, etc)
GCC 5.2.0 does not allow piping output stream into output stream, e.g.,
std::cout << std::cout
. There is no more impilicit conversion tovoid *
since C++11.std::getline()
returnsstd::basic_istream
and implicit conversion tovoid *
does not happen. Since C++11 you can use any function returningreferences to streams as loop conditions. This is because
explicit operator bool() const
was introduced since C++11.To validate stream status you need to use
operator!
,fail()
,eof()
,bad()
and friends fromstd::basic_ios
.Signed-off-by: David Abdurachmanov [email protected]