以下成員源於類 <QtAssert> 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(棄用)
void
|
Q_ASSUME (bool expr ) |
[deprecated]
void
Q_ASSUME
(
bool
expr
)
This macro is deprecated. We strongly advise against using it in new code.
Causes the compiler to assume that
expr
is
true
.
This macro is known to produce worse code than when no assumption was inserted in the code, with some compiler versions. The arguments passed to it are always evaluated, even in release mode, with some compilers and not others, so application code needs to be aware of those possible differences in behavior.
Do not use it in new code. It is retained as-is for compatibility with old code and will likely be removed in the next major version Qt.
另請參閱 Q_ASSERT (), Q_UNREACHABLE (),和 Q_LIKELY ().