I'm having the same issue. I guess I would say it's a C++ bug.
#pragma once
#include "Base.h"
class Variable : public Base
{
public:
Variable(const std::string& name)
{
_name = name;
}
~Variable() {}
std::string name() const override { return _name; }
Variable& operator = (const Base& value);
private:
std::string _name;
const Base* _assignment = nullptr;
};
Here's what I'm doing. My first thought is overload some other operator.