This commit is contained in:
邹晓航
2015-01-02 10:02:04 +08:00
parent 411c818a52
commit 24ab8f37b5

View File

@@ -336,7 +336,10 @@ namespace TinySTL{
else if (back_full()){ else if (back_full()){
reallocateAndCopy(); reallocateAndCopy();
} }
*end_ = val; //*end_ = val;
//bug fix
//2015.01.02
TinySTL::construct(end_.cur_, val);
++end_; ++end_;
} }
template<class T, class Alloc> template<class T, class Alloc>
@@ -348,7 +351,10 @@ namespace TinySTL{
reallocateAndCopy(); reallocateAndCopy();
} }
--beg_; --beg_;
*beg_ = val; //*beg_ = val;
//bug fix
//2015.01.02
TinySTL::construct(beg_.cur_, val);
} }
template<class T, class Alloc> template<class T, class Alloc>
void deque<T, Alloc>::pop_front(){ void deque<T, Alloc>::pop_front(){