C2679 binary '=': no operator found which takes a right-hand operand of type 'const TestClass1' (or there is no acceptable conversion).class TestClass1
{
public:
virtual TestClass1 & operator = (const TestClass1 & o)
{
return *this;
}
int t1;
};
class TestClass
{
public:
TestClass1 tt1;
};
Я создаю Visual Studio 2019 и использую nlohmann json.hpp И получаю следующую ошибку компилятора: [code]C2679 binary '=': no operator found which takes a right-hand operand of type 'const TestClass1' (or there is no acceptable conversion).class TestClass1 { public: virtual TestClass1 & operator = (const TestClass1 & o) { return *this; }
int t1; };
class TestClass { public: TestClass1 tt1; }; [/code] NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(TestClass,tt1)