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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2005 00:18:09 -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 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