Mark C++11/C++14 portability macros as deprecated
Pick-to: 6.4 Fixes: QTBUG-105542 Change-Id: If99a47858c5b48a726ad323fba6bf871bfda37d0 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
9674f1cc88
commit
b057659255
@ -3339,26 +3339,22 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
/*!
|
/*!
|
||||||
\macro Q_DECL_CONSTEXPR
|
\macro Q_DECL_CONSTEXPR
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
\deprecated [6.4] Use the \c constexpr keyword instead.
|
||||||
|
|
||||||
This macro can be used to declare variable that should be constructed at compile-time,
|
This macro can be used to declare variable that should be constructed at compile-time,
|
||||||
or an inline function that can be computed at compile-time.
|
or an inline function that can be computed at compile-time.
|
||||||
|
|
||||||
It expands to "constexpr" if your compiler supports that C++11 keyword, or to nothing
|
|
||||||
otherwise.
|
|
||||||
|
|
||||||
\sa Q_DECL_RELAXED_CONSTEXPR
|
\sa Q_DECL_RELAXED_CONSTEXPR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\macro Q_DECL_RELAXED_CONSTEXPR
|
\macro Q_DECL_RELAXED_CONSTEXPR
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
\deprecated [6.4] Use the \c constexpr keyword instead.
|
||||||
|
|
||||||
This macro can be used to declare an inline function that can be computed
|
This macro can be used to declare an inline function that can be computed
|
||||||
at compile-time according to the relaxed rules from C++14.
|
at compile-time according to the relaxed rules from C++14.
|
||||||
|
|
||||||
It expands to "constexpr" if your compiler supports C++14 relaxed constant
|
|
||||||
expressions, or to nothing otherwise.
|
|
||||||
|
|
||||||
\sa Q_DECL_CONSTEXPR
|
\sa Q_DECL_CONSTEXPR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -3552,18 +3548,12 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
\macro Q_DECL_NOTHROW
|
\macro Q_DECL_NOTHROW
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
\deprecated [6.4] Use the \c noexcept keyword instead.
|
||||||
|
|
||||||
This macro marks a function as never throwing, under no
|
This macro marks a function as never throwing, under no
|
||||||
circumstances. If the function does nevertheless throw, the
|
circumstances. If the function does nevertheless throw, the
|
||||||
behaviour is undefined.
|
behaviour is undefined.
|
||||||
|
|
||||||
The macro expands to either "throw()", if that has some benefit on
|
|
||||||
the compiler, or to C++11 noexcept, if available, or to nothing
|
|
||||||
otherwise.
|
|
||||||
|
|
||||||
If you need C++11 noexcept semantics, don't use this macro, use
|
|
||||||
Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR instead.
|
|
||||||
|
|
||||||
\sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR()
|
\sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -3601,20 +3591,12 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
\macro Q_DECL_NOEXCEPT
|
\macro Q_DECL_NOEXCEPT
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
\deprecated [6.4] Use the \c noexcept keyword instead.
|
||||||
|
|
||||||
This macro marks a function as never throwing. If the function
|
This macro marks a function as never throwing. If the function
|
||||||
does nevertheless throw, the behaviour is defined:
|
does nevertheless throw, the behaviour is defined:
|
||||||
std::terminate() is called.
|
std::terminate() is called.
|
||||||
|
|
||||||
The macro expands to C++11 noexcept, if available, or to nothing
|
|
||||||
otherwise.
|
|
||||||
|
|
||||||
If you need the operator version of C++11 noexcept, use
|
|
||||||
Q_DECL_NOEXCEPT_EXPR(x).
|
|
||||||
|
|
||||||
If you don't need C++11 noexcept semantics, e.g. because your
|
|
||||||
function can't possibly throw, don't use this macro, use
|
|
||||||
Q_DECL_NOTHROW instead.
|
|
||||||
|
|
||||||
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR()
|
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR()
|
||||||
*/
|
*/
|
||||||
@ -3623,20 +3605,12 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
\macro Q_DECL_NOEXCEPT_EXPR(x)
|
\macro Q_DECL_NOEXCEPT_EXPR(x)
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
\deprecated [6.4] Use the \c noexcept keyword instead.
|
||||||
|
|
||||||
This macro marks a function as non-throwing if \a x is \c true. If
|
This macro marks a function as non-throwing if \a x is \c true. If
|
||||||
the function does nevertheless throw, the behaviour is defined:
|
the function does nevertheless throw, the behaviour is defined:
|
||||||
std::terminate() is called.
|
std::terminate() is called.
|
||||||
|
|
||||||
The macro expands to C++11 noexcept(x), if available, or to
|
|
||||||
nothing otherwise.
|
|
||||||
|
|
||||||
If you need the always-true version of C++11 noexcept, use
|
|
||||||
Q_DECL_NOEXCEPT.
|
|
||||||
|
|
||||||
If you don't need C++11 noexcept semantics, e.g. because your
|
|
||||||
function can't possibly throw, don't use this macro, use
|
|
||||||
Q_DECL_NOTHROW instead.
|
|
||||||
|
|
||||||
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT
|
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user