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++/22596] Impossible to explicitly instantiate particular overloaded function


------- 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


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