[Bug c++/18681] template friend declaration not recognized

2004-11-29 Thread giovannibajo at libero dot it

--- Additional Comments From giovannibajo at libero dot it  2004-11-29 
11:34 ---
adding Kriang to CC so that he does not miss the comment.

-- 
   What|Removed |Added

 CC||lerdsuwa at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681


[Bug c++/18681] template friend declaration not recognized

2004-11-29 Thread lerdsuwa at gcc dot gnu dot org

--- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-29 
14:00 ---
OK, sorry for the mistake.  I'll look at it again.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681


[Bug c++/18681] template friend declaration not recognized

2004-11-29 Thread lerdsuwa at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
   |dot org |org
 Status|REOPENED|ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681


[Bug c++/18681] template friend declaration not recognized

2004-11-28 Thread wolfgang dot roehrl at de dot gi-de dot com

--- Additional Comments From wolfgang dot roehrl at de dot gi-de dot com  
2004-11-29 07:12 ---
Subject: Antwort:  template friend declaration not recognized





Hi all,

I'm responding to the Comments From lerdsuwa at gcc dot gnu dot org
2004-11-27 16:19:

I do not think that the cited standard rule (11.4/2) matches my example
because the nested class C1T_::S1 uses a name of its surrounding class -
namely C1T_::T_PAR. For the definition of this name class C1T_ in turn
is referring to a name of class C2T_* - namely C2T_*::T_PAR_TYPE. And
class C2T_* grants class C1T_ access to its private names.


Best regards,
W. Roehrl



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681


[Bug c++/18681] template friend declaration not recognized

2004-11-27 Thread lerdsuwa at gcc dot gnu dot org

--- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-27 
16:19 ---
Not a bug.  You are using TPAR inside the class C1T::S,
however, only C1T is a friend of C2.  This is the relevent section
of C++ standard (section 11.4 paragraph 2):

  ... the declarations of members of classes nested within
  the friend class cannot access the names of private and
  protected members from the class granting friendship. ...

and the example in the same section:

  class A {
class B {};
friend class X;
  };
  class X : A::B {   // ill-formed: A::B cannot be accessed
 // in the base-clause for X
A::B mx; // OK: A::B used to declare member of X
class Y : A::B { // OK: A::B used to declare member of X
  A::B my;   // ill-formed: A::B cannot be accessed
 // to declare members of nested class of X
};
  };


-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID
Summary|[3.3/3.4/4.0 regression]|template friend declaration
   |template friend declaration |not recognized
   |not recognized  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681


[Bug c++/18681] template friend declaration not recognized

2004-11-26 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-26 
15:33 ---


*** This bug has been marked as a duplicate of 950 ***

-- 
   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18681