2010-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/profile/unordered_map (unordered_map<>::operator[](_Key&&)):
Add.
From-SVN: r166420
+2010-11-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/profile/unordered_map (unordered_map<>::operator[](_Key&&)):
+ Add.
+
2010-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/profile/bitset (bitset<>::bitset(), bitset<>::
2010-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/profile/bitset (bitset<>::bitset(), bitset<>::
_Base::insert(__first, __last);
_M_profile_resize(__old_size, _Base::bucket_count());
}
_Base::insert(__first, __last);
_M_profile_resize(__old_size, _Base::bucket_count());
}
+
+ // operator[]
+ mapped_type&
+ operator[](const _Key& __k)
+ {
+ size_type __old_size = _Base::bucket_count();
+ mapped_type& __res = _M_base()[__k];
+ size_type __new_size = _Base::bucket_count();
+ _M_profile_resize(__old_size, _Base::bucket_count());
+ return __res;
+ }
+
- operator[](const _Key& _k)
{
size_type __old_size = _Base::bucket_count();
{
size_type __old_size = _Base::bucket_count();
- mapped_type& __res = _M_base()[_k];
+ mapped_type& __res = _M_base()[std::move(__k)];
size_type __new_size = _Base::bucket_count();
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
size_type __new_size = _Base::bucket_count();
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
void
swap(unordered_map& __x)
void
swap(unordered_map& __x)