3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

Convert stream to bool explicitly

In C++11 there is no implicit conversion from iostream classes to `void*`, just an explicit conversion to bool.
This commit is contained in:
Jonathan Wakely 2016-02-02 23:39:11 +00:00
parent 9b979b6e1e
commit f02d273ee3

View file

@ -76,7 +76,7 @@ void invoke_gdb() {
for (;;) {
std::cerr << "(C)ontinue, (A)bort, (S)top, (T)hrow exception, Invoke (G)DB\n";
char result;
bool ok = (std::cin >> result);
bool ok = bool(std::cin >> result);
if (!ok) exit(ERR_INTERNAL_FATAL); // happens if std::cin is eof or unattached.
switch(result) {
case 'C':