From 0d466c267a77cfc56a5b28fc9ec2c8b91fe0615e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Sun, 30 Nov 2014 08:57:30 +0800 Subject: [PATCH] bug fix --- TinySTL/AVLTree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TinySTL/AVLTree.h b/TinySTL/AVLTree.h index bce8948..042dfe3 100644 --- a/TinySTL/AVLTree.h +++ b/TinySTL/AVLTree.h @@ -156,7 +156,8 @@ namespace TinySTL{ void avl_tree::insert_elem(const T& val, node *&p){ if (p == 0){ p = dataAllocator::allocate(); - p->data_ = val; + //p->data_ = val; + construct(&(p->data_), val); p->left_ = p->right_ = 0; p->height_ = 1; ++size_;