This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/5023] Error declaring constructor of template class specialization as friend


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-28 22:18 -------
Hmm, I do not know if this is really valid as ICC 6.0 rejects this:

pr5023.cc
pr5023.cc(8): error: overloaded function "S<C>::S [with C=int]" is not a template
     friend S<int>::S<int>();
                    ^

pr5023.cc(8): warning #880: omission of explicit type is nonstandard ("int" assumed)
     friend S<int>::S<int>();
            ^

compilation aborted for pr5023.cc (code 2)

But this is valid and is rejected by gcc but accpected by ICC:
 template<class C>
 struct S {
     S();
 };

 struct T {
   friend S<int>::S();
 };


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-03 04:13:43         |2003-12-28 22:18:24
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]