This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/5023] Error declaring constructor of template class specialization as friend
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Dec 2003 22:18:24 -0000
- Subject: [Bug c++/5023] Error declaring constructor of template class specialization as friend
- References: <20011205144608.5023.jsberg@bnl.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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