Is there a way to generate a warning when a derived class member variable name shadows one of its parents class, e.g
class Mother
{
public:
Mother() : i(0
This will not show a warning because this is allowed. It is possible because "at most one of the one of the names is actually defined in that scope; others would be merely visible in that scope. Name resolution rules determine which name is chosen, if there are multiple candidates...You really do not want to give a warning for every case where the compiler picks between alternatives." - @MSalters.