Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QHash< Key, T >::TryEmplaceResult Class Reference

\inmodule QtCore More...

#include <qhash.h>

+ Collaboration diagram for QHash< Key, T >::TryEmplaceResult:

Public Member Functions

 TryEmplaceResult ()=default
 
 TryEmplaceResult (QHash::iterator it, bool b)
 
Q_IMPLICIT TryEmplaceResult (const std::pair< key_value_iterator, bool > &p)
 
Q_IMPLICIT operator std::pair< key_value_iterator, bool > ()
 

Public Attributes

QHash::iterator iterator
 
bool inserted
 

Detailed Description

template<typename Key, typename T>
class QHash< Key, T >::TryEmplaceResult

\inmodule QtCore

Since
6.9

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

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

See also
QHash, QHash::tryEmplace()

Definition at line 1265 of file qhash.h.

Constructor & Destructor Documentation

◆ TryEmplaceResult() [1/3]

template<typename Key, typename T>
QHash< Key, T >::TryEmplaceResult::TryEmplaceResult ( )
default

◆ TryEmplaceResult() [2/3]

template<typename Key, typename T>
QHash< Key, T >::TryEmplaceResult::TryEmplaceResult ( QHash::iterator it,
bool b )
inline

Definition at line 1272 of file qhash.h.

References TryEmplaceResult(), and inserted.

Referenced by TryEmplaceResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryEmplaceResult() [3/3]

template<typename Key, typename T>
Q_IMPLICIT QHash< Key, T >::TryEmplaceResult::TryEmplaceResult ( const std::pair< key_value_iterator, bool > & p)
inline

Definition at line 1278 of file qhash.h.

Member Function Documentation

◆ operator std::pair< key_value_iterator, bool >()

template<typename Key, typename T>
Q_IMPLICIT QHash< Key, T >::TryEmplaceResult::operator std::pair< key_value_iterator, bool > ( )
inline

Definition at line 1283 of file qhash.h.

Member Data Documentation

◆ inserted

template<typename Key, typename T>
bool QHash< Key, T >::TryEmplaceResult::inserted

Definition at line 1268 of file qhash.h.

Referenced by TryEmplaceResult().

◆ iterator

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

Definition at line 1267 of file qhash.h.


The documentation for this class was generated from the following file: