, , , , , , , , . , ( ) (.. ). , , , , ( ?) .
Here is a complete example to help someone in the future run into this problem:
class Shape
{
public:
Shape() {}
Shape(double _size)
{
size = _size;
}
Shape(const Shape& obj)
{
size = obj.size;
}
Shape& operator=(const Shape&& obj)
{
size = obj.size;
return *this;
}
double testMe() { return size; }
private:
std::mutex dataMutex;
double size;
};
source
share