QHash::TryEmplaceResult Struct

struct QHash::TryEmplaceResult

TryEmplaceResult 类用于表示tryEmplace() 操作的结果。更多

此结构在 Qt 6.9 中引入。

公共变量

bool inserted
QHash<Key, T>::iterator iterator

详细说明

TryEmplaceResult 类在QHash 中用于表示tryEmplace() 操作的结果。它持有一个iterator ,表示新创建的项目,或表示阻止插入的已存在项目,以及一个布尔值inserted ,表示是否进行了插入。

另请参阅 QHashQHash::tryEmplace()。

成员变量文档

bool TryEmplaceResult::inserted

如果已有相同密钥的条目,则该值为false

QHash<Key, T>::iterator TryEmplaceResult::iterator

持有新插入元素或阻止插入元素的迭代器。

© 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.