SpiecsEngine
 
Loading...
Searching...
No Matches

◆ has_key()

template<typename K , typename V >
bool scl::linked_unordered_map< K, V >::has_key ( const K & key)
inline

Determine whether the key is in the container.

Parameters
[in]keyK the key.
Returns
Returns true if has key inside the container.

Definition at line 212 of file LinkedUnorderedMap.h.

213 {
214 std::shared_lock<std::shared_mutex> lock(m_Mutex);
215
216 if (m_Map.find(key) != m_Map.end())
217 {
218 return true;
219 }
220 else
221 {
222 return false;
223 }
224 }
std::shared_mutex m_Mutex
Mutex for this container.
std::unordered_map< K, V > m_Map

Referenced by scl::linked_unordered_map< K, V >::find_value(), scl::linked_unordered_map< K, V >::next_value(), scl::linked_unordered_map< K, V >::prev_value(), and scl::linked_unordered_map< K, V >::push_back().