Is this legal? If not, will the following code allow this?
class Foo { friend class Foo; }
It is redundant and unnecessary. Moreover, I get the following warning in g++
warning: class ‘Foo’ is implicitly friends with itself