The code with a problem is:
template <typename T>
struct IComponent : public T
{
IComponent () = default;
IComponent (const T &value) : T(value)
{
}
IComponent &operator=(const T &value)
{
static_cast<T &>(*this) = value;
return *this;
}
operator T &()
{
return static_cast<T &>(*this);
}
operator const T &() const
{
return static_cast<const T &>(*this);
}
};
It looks like:
It should look like:
(edited with mspaint)

The code with a problem is:
It looks like:
It should look like:
(edited with mspaint)