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

Resolve issues with streams (getline(), stream to void *, etc) #11309

Merged

Conversation

davidlt
Copy link
Contributor

@davidlt davidlt commented Sep 17, 2015

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 David.Abdurachmanov@cern.ch

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 <David.Abdurachmanov@cern.ch>
@cmsbuild
Copy link
Contributor

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
CalibCalorimetry/HcalTPGAlgos
CalibFormats/SiStripObjects
Calibration/Tools
CaloOnlineTools/HcalOnlineDb

@diguida, @cerminar, @cmsbuild, @ggovi, @mmusich, @mulhearn can you please review it and eventually sign? Thanks.
@ghellwig, @pakhotin, @frmeier, @tlampen, @mschrode, @mmusich, @threus this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@mmusich
Copy link
Contributor

mmusich commented Sep 17, 2015

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@mulhearn
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@diguida
Copy link
Contributor

diguida commented Sep 17, 2015

+1

@cmsbuild
Copy link
Contributor

davidlange6 added a commit that referenced this pull request Sep 17, 2015
Resolve issues with streams (getline(), stream to void *, etc)
@davidlange6 davidlange6 merged commit 4bff084 into cms-sw:CMSSW_7_6_X Sep 17, 2015
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

6 participants