[Bug c++/42281] g++ instantiates function templates at the wrong place

2009-12-04 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-12-04 19:56 --- One issue is Koenig lookup does not apply to fundamental types. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42281

[Bug c++/42281] g++ instantiates function templates at the wrong place

2009-12-04 Thread jezz at hkfree dot org
--- Comment #2 from jezz at hkfree dot org 2009-12-04 21:30 --- I have tried to simplify the code, but I have created only problem with int (not with user structure). In real code we have also something like this: Tested with same compilers: template2.cc: In function #8216;bool

[Bug c++/42281] g++ instantiates function templates at the wrong place

2009-12-04 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2009-12-04 22:34 --- (In reply to comment #2) I have tried to simplify the code, but I have created only problem with int (not with user structure). In real code we have also something like this: Your original code is invalid code as

[Bug c++/42281] g++ instantiates function templates at the wrong place

2009-12-04 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2009-12-05 00:13 --- The reduced testcase in comment #0 is really PR 29131 which talks about fundemantal types. And report's original code is invalid based on the associated namespace is std there. So closing as a dup of bug 29131.