Topic: Legality of derivation.


Author: anatoli@yahoo.com (Anatoli)
Date: Mon, 3 Sep 2001 21:37:20 GMT
Raw View
class A
{
  class B {};
  friend class C;
};

class C : A::B { };

Sun CC dislikes it, g++ eats it with no problem. Which compiler is right?

I couldn't find the answer in the draft (have no access to the standard
itself right now).

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: news_spam@md5.ca
Date: Tue, 4 Sep 2001 10:30:55 GMT
Raw View
Anatoli <anatoli@yahoo.com> wrote:
> class A
> {
>   class B {};
>   friend class C;
> };

> class C : A::B { };

> Sun CC dislikes it, g++ eats it with no problem. Which compiler is right?

> I couldn't find the answer in the draft (have no access to the standard
> itself right now).

Sun compiler probably out of date with standarts implementations, so gcc
is more current, sun cc is prob. older so can't handle extra stuff.
p.


--
Research causes cancer in rats.
110461387
http://gpg.md5.ca
http://perlpimp.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]