Let's say I have a piece of code like this:
// Foo.h:
class Incomplete; // the forward-declaration
class Foo {
void bar(Incomplete&); // doesn't really matter
};
// Foo.cpp:
class Incomplete : private Baz {
};
void Foo::bar(Incomplete&) {
}
Is forward-declaring classes like in Foo.h
standard-compliant? If it is, since which language version? What about the same for protected
inheritance?