diff options
author | Patrick Stewart <patstew@gmail.com> | 2021-07-21 13:26:18 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-22 01:57:49 +0000 |
commit | 806ba27419f27bb5264c252a0d8faac7c3854b19 (patch) | |
tree | 53e224f60c7d56ab4fc9ada8551103625cd38b66 | |
parent | dc6453694ea75ab068a5064311052c6d744a2cdb (diff) |
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 <marc.mutz@qt.io>
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-95309
Change-Id: I56f2709c4664a7d0de84918f43b6d53cb3710612
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/gui/opengl/qopengl.h | 3 |
1 files changed, 1 insertions, 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; |