Il 24/07/19 09:25, Vadim Peretokin ha scritto:
I'm compiling my Qt application with C++17 on Windows with the Qt-provided MinGW 7.3.0 and the Qt definition of a byte is conflicting with the new one defined in the standard (http://wg21.link/p0298r3).Here's a snippet of the issue: https://paste.ubuntu.com/p/Y73FRVqq2n/Full build log: https://ci.appveyor.com/project/Mudlet/mudlet/builds/26199708What's the correct solution here?
As your log shows, that (re)definition of "byte" is coming from a MinGW header, and not Qt.
Given the definition in the Standard Library is in the namespace std, the only possibility for a clash is that there's a "using namespace std;" directive somewhere in your code (or in some other header you include; Qt does not have anything like that). The solution is, as usual, to drop such a directive.
This is the other side of the coin for "using namespace" directives: when names are added to those namespaces they may clash against existing code, destroying the isolation that namespaces offer in the first place.
HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest