bug fix
This commit is contained in:
@@ -156,7 +156,8 @@ namespace TinySTL{
|
|||||||
void avl_tree<T>::insert_elem(const T& val, node *&p){
|
void avl_tree<T>::insert_elem(const T& val, node *&p){
|
||||||
if (p == 0){
|
if (p == 0){
|
||||||
p = dataAllocator::allocate();
|
p = dataAllocator::allocate();
|
||||||
p->data_ = val;
|
//p->data_ = val;
|
||||||
|
construct(&(p->data_), val);
|
||||||
p->left_ = p->right_ = 0;
|
p->left_ = p->right_ = 0;
|
||||||
p->height_ = 1;
|
p->height_ = 1;
|
||||||
++size_;
|
++size_;
|
||||||
|
|||||||
Reference in New Issue
Block a user