fix msvs compile by using explicit assigment operator - closes #2588

This commit is contained in:
Dane Springmeyer 2014-12-09 10:27:05 -05:00
parent 4b2ad9e65f
commit 653cc08500

View file

@ -56,6 +56,18 @@ struct buffer
if (data_) std::copy(rhs.data_, rhs.data_ + rhs.size_, data_);
}
buffer& operator=(buffer rhs)
{
swap(rhs);
return *this;
}
void swap(buffer & rhs)
{
std::swap(size_, rhs.size_);
std::swap(data_, rhs.data_);
}
inline bool operator!() const { return (data_ == nullptr)? false : true; }
~buffer()
{