What is the best way to avoid Warning C4250 (inheritance via dominance)?
I am using MS VS 2013 Community edition.
I have the following code:
interface IHEEntity
{
public:
virtual size_t GetId() const = 0;
virtual void SetId(const size_t Value) = 0;
public:
virtual ~IHEEntity() {};
};
class CHEEntity : public virtual IHEEntity
{
protected:
size_t m_Id;
public:
size_t GetId() const final { return m_Id; }
void SetId(const size_t Value) final { m_Id = Value; }
public:
CHEEntity() {};
virtual ~CHEEntity() {};
};
interface IHEArc : public virtual IHEEntity
{
public:
}
class CHEArc :
public virtual CHEEntity,
public virtual IHEArc
{
public:
using CHEEntity::GetId;
using CHEEntity::SetId;
}
When I try to compile it, I get the aforementioned warning. Is there any way to get rid of that warning without using warning suppression via pragma? Or there might be any other way to achieve the intended result?