[Bug c++/22363] Problems with friend function injection and destructor
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 30 05:12:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-30 05:12 -------
For the testcase in comment #2, on the mainline, we get a different error message:
t.cc:2: warning: friend declaration Âvoid foo(T*)Â declares a non-template function
t.cc:2: warning: (if this is not what you intended, make sure the function template has already been
declared and add <> after the function name here) -Wno-non-template-friend disables this warning
t.cc: In function Âvoid bar() [with T = X<int>]Â:
t.cc:10: instantiated from ÂX<T>::X() [with T = X<int>]Â
t.cc:13: instantiated from here
t.cc:5: error: Âfoo was not declared in this scope
This seems better as friend don't intject the declation at all.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22363
More information about the Gcc-bugs
mailing list