jonnydee/nzmqt

Compilation issues at impl.hpp

Opened this issue · 0 comments

At https://github.com/jonnydee/nzmqt/blob/master/include/nzmqt/impl.hpp#L87 I get an error in compiling using G++ 9.2.0.

Instead of QByteArray(data(), int(size())) the following seems to do the job:
QByteArray((char *) data(), int(size()))

./nzmqt/impl.hpp: In member function 'QByteArray nzmqt::ZMQMessage::toByteArray()':
./nzmqt/impl.hpp:90:43: error: expected primary-expression before '(' token
   90 |      return size() <= INT_MAX ? QByteArray(data<char>(), int(size())) : QByteArray();
      |                                           ^
./nzmqt/impl.hpp:90:49: error: expected primary-expression before 'char'
   90 |      return size() <= INT_MAX ? QByteArray(data<char>(), int(size())) : QByteArray();