From 806ba27419f27bb5264c252a0d8faac7c3854b19 Mon Sep 17 00:00:00 2001 From: Patrick Stewart Date: Wed, 21 Jul 2021 13:26:18 +0100 Subject: qopengl.h: Move C header #include(s) out of the QT_NAMESPACE The Clang backend of MSVC declares nullptr_t in namespace std there, then expects to find it under ::std::nullptr_t to define a ::nullptr_t. That breaks with a namespaced build, of course. Fix by moving the QT_BEGIN_NAMESPACE to just before the first typedef that declares a Qt-owned name. Done-with: Marc Mutz Pick-to: 5.15 6.2 6.3 Fixes: QTBUG-95309 Change-Id: I56f2709c4664a7d0de84918f43b6d53cb3710612 Reviewed-by: Andrei Golubev Reviewed-by: Thiago Macieira --- src/gui/opengl/qopengl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h index b09d8e2d1d..d487a7fa39 100644 --- a/src/gui/opengl/qopengl.h +++ b/src/gui/opengl/qopengl.h @@ -157,8 +157,6 @@ typedef char GLchar; # endif #endif -QT_BEGIN_NAMESPACE - // When all else fails we provide sensible fallbacks - this is needed to // allow compilation on OS X 10.6 @@ -287,6 +285,7 @@ typedef GLintptr GLvdpauSurfaceNV; // End of block copied from glext.h #endif +QT_BEGIN_NAMESPACE // Types that aren't defined in all system's gl.h files. typedef ptrdiff_t qopengl_GLintptr; -- cgit v1.2.3