This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ language lawyer question
Gerald Pfeifer <gerald@pfeifer.com> writes:
| + <li>In case of friend declarations that refer to members of a class,
| + these members need to be <code>public</code>, whereas G++ used to
| + accept <code>private</code>/<code>protected</code> members as well.
"need to be public" is both too strong and incomplete.
What is required is that every name used in the friend declaration be
accessible at the point of declaration.
-- Gaby