   C++ tricky virtual inheritance situation
  Hi!I'm dealing with the following inheritance situation    IShader/  \  /    \Shader   IPixelShader    \    /\  /  PixelShaderIShader and IPixelShader only have pure-virtual methods and both Shader and IPixelShader use virtual inheritance to inherit from IShader.This works alright, but I'm getting a whole bunch of "warning C4250: 'PixelShader': inherits 'Shader::Shader::SetMatrix' via dominance".So my question is: isn't that how it's supposed to work? If not, how can I fix it? And if it is the way it's supposed to work, is it safe to disable that particular warning?Thanks a lot in advance!   
  It's hard to say exactly what the problem is but the error description will clarify it. Seen this warning the first time.http://msdn.microsoft.com/en-us/library/6b3sy7ae.aspxAs far as I can get it, Shader::Shader::SetMatrix gets inherited and it covers up another SetMatrix function somewhere in the hierarchy. My guess is in IShader. So because the dominance effect, any calls inside PixelShader to SetMatrix will invoke Shader::Shader::SetMatrix, rather than other SetMatrix upper in the class hierarchy. But let's see what others say. You could post the 4 class declarations in the meantime.   ;  The C++ FAQ Lite chapter on multiple inheritance may have some information, especially the section on sibling delegation.   ;  Thanks everyone!Actually I read the C++ FAQ and the error description before posting here ;-)I think I realize what the problem is now: C++ doesn't care that IShader is purely abstract and so to the compiler there's an ambiguity there, that it tries to resolve via dominance (I'm assuming it's picking the concrete methods over the pure virtual ones because...well, they're more concrete). So it's doing the right thing, but probably for the wrong reasons...I think I'll try and come up with a better design.Thanks again!   ;  It's doing the right thing, it's just spitting out a warning to make sure you're aware of what's going on, since it's an uncommonly used feature.   