QStringParser::toInteger<> bug
Posted: Thu Sep 09 2021 10:15 pm
bool okFlag = false;
char32_t c = QStringParser::toInteger<char32_t>(text, &okFlag);
https://www.copperspice.com/docs/cs_api/class_qchar32.html
QChar32 (char32_t c)
FAILED: src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o
/usr/bin/c++ -DBUILD_DATE=\"09/09/2021\" -Isrc -I/home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src -isystem /usr/local/include/QtCore -isystem /usr/local/include/QtGui -isystem /usr/local/include/CsScintilla -g -DSCINTILLA_CS -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -Wall -Wextra -Wuninitialized -pedantic -Werror -std=gnu++17 -MD -MT src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o -MF src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o.d -o src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o -c /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp
In file included from /usr/local/include/QtCore/qstring.h:2,
from /usr/local/include/QtCore/qiodevice.h:28,
from /usr/local/include/QtCore/qdatastream.h:29,
from /usr/local/include/QtCore/qpair.h:27,
from /usr/local/include/QtCore/QPair:1,
from /usr/local/include/CsScintilla/CsScintillaEdit.h:11,
from /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.h:7,
from /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp:12:
/usr/local/include/QtCore/qstringparser.h: In instantiation of ‘static R QStringParser::toInteger(const T&, bool*, int) [with R = char32_t; T = QString8]’:
/home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp63: required from here
/usr/local/include/QtCore/qstringparser.h:385:17: error: no match for ‘operator>>’ (operand types are ‘std::istringstream’ {aka ‘std::__cxx11::basic_istringstream<char>’} and ‘char32_t’)
385 | stream >> retval;
| ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/iterator:65,
from /usr/local/include/QtCore/cs_string.h:26,
This cascades for about 15-20 screens as the compiler tries every possible interpretation except a matching one.
char32_t c = QStringParser::toInteger<char32_t>(text, &okFlag);
https://www.copperspice.com/docs/cs_api/class_qchar32.html
QChar32 (char32_t c)
FAILED: src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o
/usr/bin/c++ -DBUILD_DATE=\"09/09/2021\" -Isrc -I/home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src -isystem /usr/local/include/QtCore -isystem /usr/local/include/QtGui -isystem /usr/local/include/CsScintilla -g -DSCINTILLA_CS -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -Wall -Wextra -Wuninitialized -pedantic -Werror -std=gnu++17 -MD -MT src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o -MF src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o.d -o src/CMakeFiles/Example3.dir/edtbasewidget.cpp.o -c /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp
In file included from /usr/local/include/QtCore/qstring.h:2,
from /usr/local/include/QtCore/qiodevice.h:28,
from /usr/local/include/QtCore/qdatastream.h:29,
from /usr/local/include/QtCore/qpair.h:27,
from /usr/local/include/QtCore/QPair:1,
from /usr/local/include/CsScintilla/CsScintillaEdit.h:11,
from /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.h:7,
from /home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp:12:
/usr/local/include/QtCore/qstringparser.h: In instantiation of ‘static R QStringParser::toInteger(const T&, bool*, int) [with R = char32_t; T = QString8]’:
/home/roland/sf_projects/roland_hughes-csscintilla/copperspice_examples/Example3/src/edtbasewidget.cpp63: required from here
/usr/local/include/QtCore/qstringparser.h:385:17: error: no match for ‘operator>>’ (operand types are ‘std::istringstream’ {aka ‘std::__cxx11::basic_istringstream<char>’} and ‘char32_t’)
385 | stream >> retval;
| ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/iterator:65,
from /usr/local/include/QtCore/cs_string.h:26,
This cascades for about 15-20 screens as the compiler tries every possible interpretation except a matching one.