Obsolete Members for <QPair>
类<QPair> 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。
函数
(deprecated) decltype(auto) | qMakePair(T1 &&value1, T2 &&value2) |
函数文档
[constexpr noexcept(...), deprecated]
template <typename T1, typename T2> decltype(auto) qMakePair(T1 &&value1, T2 &&value2)
该函数已被弃用。我们强烈建议不要在新代码中使用它。
qMakePair 将参数转发给 std::make_pair,并返回生成的 std::pair。提供它是为了向后兼容。请直接使用 std::make_pair。
注意: 当noexcept(std::make_pair(std::forward<T1>(value1), std::forward<T2>(value2)))
为true
时,此函数为 noexcept。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.