diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index e04d9fdefa..14c17d1ce3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -923,13 +923,9 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic # endif #endif -namespace QtPrivate { -template struct QAddConst { typedef const T Type; }; -} - // this adds const to non-const objects (like std::as_const) template -Q_DECL_CONSTEXPR typename QtPrivate::QAddConst::Type &qAsConst(T &t) Q_DECL_NOTHROW { return t; } +Q_DECL_CONSTEXPR typename std::add_const::type &qAsConst(T &t) Q_DECL_NOTHROW { return t; } // prevent rvalue arguments: template void qAsConst(const T &&) Q_DECL_EQ_DELETE;