forked from boostorg/unordered
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:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user