vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
_ConstructTransaction __tx(*this, __n);
- for (; __tx.__pos_ != __tx.__new_end_; ++__tx.__pos_) {
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_));
+ const_pointer __new_end = __tx.__new_end_;
+ for (pointer __pos = __tx.__pos_; __pos != __new_end; ++__pos, __tx.__pos_ = __pos) {
+ __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos));
}
}
vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
{
_ConstructTransaction __tx(*this, __n);
- for (; __tx.__pos_ != __tx.__new_end_; ++__tx.__pos_) {
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_), __x);
+ const_pointer __new_end = __tx.__new_end_;
+ for (pointer __pos = __tx.__pos_; __pos != __new_end; ++__pos, __tx.__pos_ = __pos) {
+ __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x);
}
}
{
pointer __i = __from_s + __n;
_ConstructTransaction __tx(*this, __from_e - __i);
- for (; __i < __from_e; ++__i, ++__tx.__pos_) {
+ for (pointer __pos = __tx.__pos_; __i < __from_e;
+ ++__i, ++__pos, __tx.__pos_ = __pos) {
__alloc_traits::construct(this->__alloc(),
- _VSTD::__to_address(__tx.__pos_),
+ _VSTD::__to_address(__pos),
_VSTD::move(*__i));
}
}