jonnydee / nzmqt

nzmqt - A lightweight C++ Qt binding for ZeroMQ
Other
199 stars 72 forks source link

Compilation issues at impl.hpp #55

Open skinkie opened 4 years ago

skinkie commented 4 years ago

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();