我有这样的代码:无法访问私有成员 - 原子
class Animator{
public:
private:
bool _running;
atomic<bool> _waiting;
};
Visual Studio中说Error 2 error C2248: 'std::atomic<bool>::operator =' : cannot access private member declared in class 'std::atomic<bool>' d:\programmierung\uncertainty\uncertainty\uncertainty\animator.h 113
我看不到这个类和最小类之间的区别只用原子作为一个会员,工作。
提供了一个完整但最小的例子。我没有看到有问题的线路,而你的例子中充满了不相关的东西*。 –