erikerlandson / st_tree

A fast and flexible c++ template class for tree data structures
https://github.com/erikerlandson/st_tree/wiki
Apache License 2.0
95 stars 20 forks source link

bug in the tree<> copy constructor #13

Closed erikerlandson closed 10 years ago

erikerlandson commented 10 years ago

Thanks to José Antonio Carmena Flores:

I think there can be a bug in the copy constructor. It's written this way: tree(const tree& src) { *this = src; }

But this causes problems because the _root member remains uninitialized. So I gess it should be: tree(const tree& src) : _root(NULL) { *this = src; }