------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-03 02:03 -------
This is not a bug, it comes down to something like:
class a
{
  friend void f(void);
};

int main(void)
{
  f();
}

void f(void) {}
----

Friends don't inject into the scope at all.
In enumNameMap.hh, we have:
class PosRMSDPot ...
{
  friend istream& operator>>(istream& s, PosRMSDPot_Restraint& x);
  friend ostream& operator<<(ostream& s, const PosRMSDPot_Restraint& x);
  friend class PosRMSDPot_Restraint; 
};

...

Use >> later on.

The way to fix this is inject the friend your self (or use -ffriend-injection
to work around your invalid code).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25238

Reply via email to