I have this code here:
template <typename T>
sorted_vector<T>& sorted_vector<T>::operator = ( sorted_vector<T> && src ) {
delete [] beg_;
beg_ = src.beg_;
end_ = src.end_;
cap_ = src.cap_;
src.beg_ = nullptr;
src.end_ = nullptr;
src.cap_ = nullptr;
return *this;
}
If I am trying to unit test this using the boost library, how can I compare the original location of the vector, and the new "moved to" location?
Aucun commentaire:
Enregistrer un commentaire