Is this legal? If not, will the following code allow this?
class Foo { friend class Foo; }
Classes friending themselves makes sense if they're templates, as each instantiation with distinct parameters is a different class.