QHash::TryEmplaceResult Struct

struct QHash ::TryEmplaceResult

The TryEmplaceResult class is used to represent the result of a tryEmplace () operation. 更多...

This struct was introduced in Qt 6.9.

公共变量

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

详细描述

The TryEmplaceResult class is used in QHash to represent the result of a tryEmplace () operation. It holds an iterator to the newly created item, or to the pre-existing item that prevented the insertion, and a boolean, inserted , denoting whether the insertion took place.

另请参阅 QHash and QHash::tryEmplace ().

成员变量文档编制

bool TryEmplaceResult:: inserted

This value is false if there was already an entry with the same key.

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

Holds the iterator to the newly inserted element, or the element that prevented the insertion.