SpiecsEngine
 
Loading...
Searching...
No Matches

◆ first()

template<typename K , typename V >
V * scl::linked_unordered_map< K, V >::first ( )

Get the first element of this container.

Returns
Returns the first element found.

Definition at line 336 of file LinkedUnorderedMap.h.

337 {
338 std::shared_lock<std::shared_mutex> lock(m_Mutex);
339
340 if (size() == 0) return nullptr;
341
342 return &m_Map[m_Keys.front()];
343 }
std::shared_mutex m_Mutex
Mutex for this container.
std::unordered_map< K, V > m_Map
size_t size()
The container's element size.
std::list< K > m_Keys
The container keeps iter in order.