diff --git a/TinySTL/Deque.h b/TinySTL/Deque.h index 52c1294..bdea849 100644 --- a/TinySTL/Deque.h +++ b/TinySTL/Deque.h @@ -336,7 +336,10 @@ namespace TinySTL{ else if (back_full()){ reallocateAndCopy(); } - *end_ = val; + //*end_ = val; + //bug fix + //2015.01.02 + TinySTL::construct(end_.cur_, val); ++end_; } template @@ -348,7 +351,10 @@ namespace TinySTL{ reallocateAndCopy(); } --beg_; - *beg_ = val; + //*beg_ = val; + //bug fix + //2015.01.02 + TinySTL::construct(beg_.cur_, val); } template void deque::pop_front(){