add macos map operator[]

This commit is contained in:
altalk23 2023-08-27 19:40:49 +03:00
parent d6ef0a9650
commit 824614e704

View file

@ -185,6 +185,14 @@ namespace gd {
--m_nodecount;
}
V& operator[](K const& __k) {
iterator __i = lower_bound(__k);
if (__i == end() || compare(__k, (*__i).first)) {
__i = insert(__i, std::pair<K, V>(__k, V()));
}
return (*__i).second;
}
iterator begin() noexcept {
return iterator(m_header.m_left);
}