This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function
- 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: 21 Jul 2005 18:57:56 -0000
- Subject: [Bug c++/22596] Impossible to explicitly instantiate particular overloaded function
- References: <20050721184642.22596.phenning@lanl.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-21 18:57 -------
Note both Comeau and ICC have this same behavior.
Even the following code calls the second declaration too:
template<class T> struct A_class
{
int do_it(int i){return T::f(i);}
};
template<class A> int foo(A a);
template<class A, class T> int foo(A_class<T> a)
{
return a.do_it(2);
}
void g(void)
{
A_class<int> a;
foo<A_class<int> >(a);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596