Unordered: Merge unordered from trunk.

- Activate `std::allocator_traits` for gcc 4.7 and Visual C++ 11.
- Implement variadic construct in `boost::unordered::detail::allocator_traits`
  when variadics, rvalue references and SFINAE expression are available.
- Use variadic construct from `allocator_traits`, or when not available move
  the logic for constructing `value_type` to a lower level, so the container
  code is a bit simpler.
- Avoid `-Wshadow` warnings. Fixes #6190.
- Implement `reserve`. Fixes #6857.


[SVN r78432]
This commit is contained in:
Daniel James
2012-05-12 08:14:05 +00:00
parent 880d778ab6
commit 808f1f939f
31 changed files with 763 additions and 297 deletions

View File

@@ -219,14 +219,14 @@ namespace test
data_.last_ptr_ = &data_.first_;
}
void erase(const_iterator start, const_iterator end) {
void erase(const_iterator i, const_iterator j) {
node** ptr = &data_.first_;
while(*ptr != start.ptr_) {
while(*ptr != i.ptr_) {
ptr = &(*ptr)->next_;
}
while(*ptr != end.ptr_) {
while(*ptr != j.ptr_) {
node* to_delete = *ptr;
*ptr = (*ptr)->next_;
--data_.size_;