--- Comment #6 from paolo dot carlini at oracle dot com 2009-10-30 12:24
---
Ok, let's close it as invalid. For the record, Comeau 4.3.10.1 Beta2 also
rejects it.
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
--- Comment #5 from redi at gcc dot gnu dot org 2009-10-30 12:15 ---
(In reply to comment #3)
> I think it is a bug, because the class test is declared at the scope ::
A friend declaration specifies a class that belongs to the innermost enclosing
namespace scope, outer scopes are not co
--- Comment #4 from redi at gcc dot gnu dot org 2009-10-30 12:14 ---
(In reply to comment #2)
> Isn't ::foo the using'd class from name?
No, see 7.3.1.2 [namespace.memdef]/3 - an unqualified friend declaration refers
to a member of the innermost enclosing namespace. Names brought into a
--- Comment #3 from mdjones0978-gccbugs at yahoo dot com 2009-10-30 02:48
---
I think it is a bug, because the class test is declared at the scope :: (before
the namespace), then used below. The solution is to explicitly state the fact
it is from ::
#include
class Test;
namespace B
--- Comment #2 from igodard at pacbell dot net 2008-05-06 21:39 ---
Isn't ::foo the using'd class from name? If not, how does one befriend a class
that comes from a using?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36163
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-06 21:31 ---
I don't think this is a bug, the friend class here is really ::foo.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36163