Используя NLOHMANN_DEFINE_TYPE_NON_INTRUSIVEC++

Программы на C++. Форум разработчиков
Anonymous
Используя NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE

Сообщение Anonymous »

Я создаю Visual Studio 2019 и использую nlohmann json.hpp
И получаю следующую ошибку компилятора:

Код: Выделить всё

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;
};
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(TestClass,tt1)

Подробнее здесь: https://stackoverflow.com/questions/783 ... -intrusive

Вернуться в «C++»