From 24ab8f37b5a9aab4f45168b326b5747a5852465f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Fri, 2 Jan 2015 10:02:04 +0800 Subject: [PATCH] bug fix --- TinySTL/Deque.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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(){