This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Yet another template bug in gcc-2.95.1


>   The main problem is that the member function operators interact with the
> friend operators although they take different arguments.

Thanks for your bug report. I'm not too sure whether the bug is in
your code or in g++. What exactly is the friend declaration supposed
to declare as a friend? And where in the standard is that supposed to
be supported?

Anyway, a work-around is to write

  // now I bring in the friends...
  template <class T> 
  friend
  ptrdiff_t operator- (const _r__It <T>& x, const _r__It <T>& y);

  template <class T>
  friend
  _r__It<T> operator+ (ptrdiff_t n,const _r__It <T>& x);

Hope this helps,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]