[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2011-06-22 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596 Jason Merrill changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2011-06-22 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #8 f

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-26 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added GCC target triplet|i686-pc-linux-gnu, powerpc- | |apple-darwin8 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread bangerth at dealii 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 void f(T) {} template void f(T) {} template void f (int); -

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread phenning at lanl dot gov
--- Additional Comments From phenning at lanl dot gov 2005-07-21 23:26 --- (In reply to comment #5) > Your explicit instantiation > template int foo< A_class >(A_class a); > obviously matches both the declarations of foo. I'm unsure which > one the compiler should choose, but if you

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2005-07-21 23:17 --- Your explicit instantiation template int foo< A_class >(A_class a); obviously matches both the declarations of foo. I'm unsure which one the compiler should choose, but if you want to instantiate the secon

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread phenning at lanl dot gov
--- Additional Comments From phenning at lanl dot gov 2005-07-21 19:16 --- (In reply to comment #2) > void g(void) > { > A_class a; > foo >(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:

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-21 18:58 --- I don't think this is a bug in the front-end. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread pinskia 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 struct A_class { int do_it(int i){return T::f(i);} }; template int foo(A a); template

[Bug c++/22596] Impossible to explicitly instantiate particular overloaded function

2005-07-21 Thread phenning at lanl dot gov
--- Additional Comments From phenning at lanl dot gov 2005-07-21 18:48 --- Created an attachment (id=9324) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9324&action=view) sample code illustrating problem -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22596