Obsolete Members for <QtTypeTraits>

The following members of class <QtTypeTraits> are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Functions

(deprecated in 6.6) void qAsConst(const T &&t)

Function Documentation

[deprecated in 6.6] template <typename T> void qAsConst(const T &&t)

This function is deprecated since 6.6. We strongly advise against using it in new code.

This is an overloaded function.

This overload is deleted to prevent a dangling reference in code like

     for (QChar ch : qAsConst(funcReturningQString()))
         process(ch); // ERROR: ch is copied from deleted memory