------- Additional Comments From phenning at lanl dot gov 2005-07-21 19:16 ------- (In reply to comment #2)
> void g(void) > { > A_class<int> a; > foo<A_class<int> >(a); > } Right, and I think that it should in that case. It seems that g++ attempts to call the first definition when there is usage like: foo(something_that_returns_Aclass_int()); So, when I try to compile code that uses std::vector<int>, the compiler generates calls to both std::_Destroy<int*, std::allocator<int> >(int *, int*, std::allocator<int>) and std::_Destroy<int*, std::allocator<int>, int>(int *, int*, std::allocator<int>) Since I can't explicitly instantiate the first form, I can't compile std::vector code with -fno-implicit- templates. This could be changed by how _Destroy is implemented, but it seems strange that I can't explicitly instantiate a class, given that I'm providing the template parameter signature explicitly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596