On Wed, Jul 24, 2019 at 11:38 AM Giuseppe D'Angelo via Interest < interest@qt-project.org> wrote:
> 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/26199708 > > > > What'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. > > That was it! Thanks for the detailed explanation. Removing the 'using namespace std;' did the trick.
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest