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

cannot convert 'std::basic_istream<char>::__istream_type to bool (C++11) #11

Closed
EmSyndio opened this issue Feb 21, 2017 · 3 comments
Closed

Comments

@EmSyndio
Copy link

Compiling on Alpine Linux

strconv.cxx:233:10: error: cannot convert 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'bool' in assignment
       ok = (S >> result);

It seems to be linked to boolean being explicit with C++11
(see http://stackoverflow.com/questions/22330765/how-to-fix-istringstream-compiler-error)

I'm not a C++ expert, but it seems easy to fix.
Just wanted to report and make sure I'm correct about the assumption.

@EmSyndio
Copy link
Author

ok = static_cast<bool>(S >> result);
does the trick

@EmSyndio
Copy link
Author

sorry, I see it's already patched.
I was using the source at
http://pqxx.org/download/software/libpqxx/libpqxx-3.1.1.tar.gz
which does not have the patch.

@jtv
Copy link
Owner

jtv commented Feb 28, 2017

Glad that problem is over for you. :)

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

No branches or pull requests

2 participants