This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14500] most specialized function template vs. non-template function
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2004 07:21:30 -0000
- Subject: [Bug c++/14500] most specialized function template vs. non-template function
- References: <20040309045153.14500.bkoz@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-03-09 07:21 -------
Subject: Re: most specialized function template vs. non-template function
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| ------- Additional Comments From bangerth at dealii dot org 2004-03-09 05:18 -------
| Hm, I have a hard time understanding what's going on. Would you
| mind posting a self-contained example that doesn't make use
| of odd include files that contain using namespace stuff?
Try with this:
namespace A {
template<class T> X { };
template<class T>
void f(X<T>&); // #1
}
namespace B {
using namespace A __attribute__((trustme));
template<class T>
void f(T&); // #2
}
struct foo { };
namespace B {
template<>
void(X<foo>&); // #3
}
B::X<int> x;
B::f(x); // calls #2 instead of #3
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14500