[Bug c++/21092] friend inaccessibility

2005-04-18 Thread kreckel at ginac dot de
--- Additional Comments From kreckel at ginac dot de 2005-04-18 21:08 --- (In reply to comment #5) > (In reply to comment #3) > > This sentence just says that you can't do this: > > class A { private: struct I{}; }; > > class B { friend class A::I; }; > > because A::I isn't acce

[Bug c++/21092] friend inaccessibility

2005-04-18 Thread kreckel at ginac dot de
--- Additional Comments From kreckel at ginac dot de 2005-04-18 21:04 --- (In reply to comment #3) > This sentence just says that you can't do this: > class A { private: struct I{}; }; > class B { friend class A::I; }; > because A::I isn't accessible in B. Where's that snippet

[Bug c++/21092] friend inaccessibility

2005-04-18 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2005-04-18 20:34 --- And the answer to the original question: even though gcc handled it as this in the past (incorrectly), a friend declaration is not a declaration. In other words, if a name is not declared before, but first see

[Bug c++/21092] friend inaccessibility

2005-04-18 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2005-04-18 20:29 --- This sentence just says that you can't do this: class A { private: struct I{}; }; class B { friend class A::I; }; because A::I isn't accessible in B. W. -- http://gcc.gnu.org/bugzilla/show_bug.c

[Bug c++/21092] friend inaccessibility

2005-04-18 Thread kreckel at ginac dot de
--- Additional Comments From kreckel at ginac dot de 2005-04-18 20:19 --- (In reply to comment #1) > No, the code is invalid, as Y has not been interjected yet. This is a progression and not a regression. Really? What about paragraph 11.4/7 "A name nominated by a friend declaration sh

[Bug c++/21092] friend inaccessibility

2005-04-18 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-18 19:40 --- No, the code is invalid, as Y has not been interjected yet. This is a progression and not a regression. -- What|Removed |Added -