0
Vote

The friend declaration is being considered as member of the class

description

The parser is considering the method/class of the friend declaration as a member of the class where the declaration is inside. The correct behavior is to consider the method/class as external to the class, for example in:
class a { friend class b; };
 
class b is being considered to be declared as ::a::b instead of ::b. 
 
Note: Find out the correct behavior for:
class  c {
  class d {};
  friend class d;
};

comments