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 bangerth at dealii dot org  2005-07-22 00:18 -------
Oh, I apparently didn't read closely enough. I see the problem now. 
 
For others -- take this: 
--------------------- 
template <typename T> void f(T) {} 
template <typename U, typename T> void f(T) {} 
 
template void f<int> (int); 
--------------------- 
We want the first function to be instantiated, but both functions match 
the signature and gcc (as well as icc) instantiate the second: 
 
g/x> c++ -c x.cc 
g/x> nm -C x.o 
00000000 W void f<int, int>(int) 
 
I remember that there was a PR on this somewhere in bugzilla, and possibly 
a DR on this. I don't remember the conclusion, though... 
 
W. 

-- 


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]