[Bug c++/21092] friend inaccessibility
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 18 20:34:00 GMT 2005
------- 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 seen in a friend
declaration, then this does not make this name known. This is the problem
you run against: class Y is only marked for friendship in the friend
declaration,
for when the class is actually declared later on. However, it is still
undeclared once you get to the function declaration.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21092
More information about the Gcc-bugs
mailing list