[Bug c++/61987] Name Resolution within a Template

2014-08-01 Thread gaoyuanming at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987 --- Comment #7 from Yuanming Gao --- Please read the book: <>. The code comes from <<7.1 Templates>>. The author thought the function int foo(int) must be selected. Visual C++ can select the int foo(int) correctly. I don't know whether it is an

[Bug c++/61987] Name Resolution within a Template

2014-08-01 Thread gaoyuanming at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987 --- Comment #6 from Yuanming Gao --- Visual C++ can select the int foo(int) correctly. I don't know whether it is an implementation issue, or it is by design. Best regards, Yuanming > From: gcc-bugzi...@gcc.gnu.org > To: gaoyuanm...@hotmail.co

[Bug c++/61987] Name Resolution within a Template

2014-08-01 Thread gaoyuanming at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987 --- Comment #3 from Yuanming Gao --- Please read the book: <>. The code comes from <<7.1 Templates>>. The author thought the function int foo(int) must be selected. Best regards, Yuanming Gao > From: gcc-bugzi...@gcc.gnu.org > To: gaoyuanm...@

[Bug c++/61987] Name Resolution within a Template

2014-08-01 Thread gaoyuanming at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987 --- Comment #1 from Yuanming Gao --- Created attachment 33223 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33223&action=edit source code

[Bug c++/61987] New: Name Resolution within a Template

2014-08-01 Thread gaoyuanming at hotmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: gaoyuanming at hotmail dot com Created attachment 33222 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33222&action=edit Assembly code I compiled the piece of code: #include int foo(double d) { return static_cast(d); } t