+2010-11-10 François Dumont <francois.cppdevs@free.fr>
+
+ * include/profile/unordered_map (unordered_map<>::_M_profile_size):
+ Simplify, don't take a __new_size argument; adjust all callers.
+
2010-11-10 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/44436 (partial)
2010-09-03 François Dumont <francois.cppdevs@free.fr>
- * testsuite/lib/libstdc++.exp ([check_v3_target_debug_mode]): Fix so
- that it really detects when debug mode is activated.
- * testsuite/util/debug/construct_neg.h, insert_neg.h, assign_neg.h:
- Remove, content moved...
- * testsuite/util/debug/checks.h: ... here. Modify checks to take the
+ * testsuite/lib/libstdc++.exp ([check_v3_target_debug_mode]): Fix so
+ that it really detects when debug mode is activated.
+ * testsuite/util/debug/construct_neg.h, insert_neg.h, assign_neg.h:
+ Remove, content moved...
+ * testsuite/util/debug/checks.h: ... here. Modify checks to take the
type of the container to test rather than an intermediate container
- type traits helper.
+ type traits helper.
* testsuite/23_containers/unordered_map/debug/insert1_neg.cc: Update to
use dg-require-debug-mode when necessary and use new check functions.
* testsuite/23_containers/unordered_map/debug/construct1_neg.cc:
{
size_type __old_size = _Base::bucket_count();
_Base::insert(__l);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
}
std::pair<iterator, bool>
{
size_type __old_size = _Base::bucket_count();
std::pair<iterator, bool> __res = _Base::insert(__obj);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
return __res;
}
{
size_type __old_size = _Base::bucket_count();
iterator __res = _Base::insert(__iter, __v);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
return __res;
}
size_type __old_size = _Base::bucket_count();
std::pair<iterator, bool> __res
= _Base::insert(std::forward<_Pair>(__obj));
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
return __res;
}
{
size_type __old_size = _Base::bucket_count();
iterator __res = _Base::insert(__iter, std::forward<_Pair>(__v));
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
return __res;
}
{
size_type __old_size = _Base::bucket_count();
_Base::insert(__first, __last);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
}
void
{
size_type __old_size = _Base::bucket_count();
_Base::insert(__first, __last);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
}
// operator[]
{
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());
+ _M_profile_resize(__old_size);
return __res;
}
{
size_type __old_size = _Base::bucket_count();
mapped_type& __res = _M_base()[std::move(__k)];
- size_type __new_size = _Base::bucket_count();
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
return __res;
}
{
size_type __old_size = _Base::bucket_count();
_Base::rehash(__n);
- _M_profile_resize(__old_size, _Base::bucket_count());
+ _M_profile_resize(__old_size);
}
private:
void
- _M_profile_resize(size_type __old_size, size_type __new_size)
+ _M_profile_resize(size_type __old_size)
{
+ size_type __new_size = _Base::bucket_count();
if (__old_size != __new_size)
__profcxx_hashtable_resize(this, __old_size, __new_size);
}