--- Comment #7 from pinskia at gcc dot gnu dot org 2006-02-06 20:24 ---
(In reply to comment #6)
> Note, I didn't change the status of the bug yet.
> And you are absolutely right about the behavior of fundamental types. But I
> still encounter a problem with classes.
> Can you explain th
--- Comment #6 from dg001 at t-online dot de 2006-02-06 20:06 ---
Note, I didn't change the status of the bug yet.
And you are absolutely right about the behavior of fundamental types. But I
still encounter a problem with classes.
Can you explain the behavior of gcc in the following exam
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-02-06 00:29 ---
Why do you think ADL has anything to do with finding ::f here?
>From the standard:
-- If T is a fundamental type, its associated sets of namespaces and classes
are both empty.
So we cannot find ::f here at all.
-
--- Comment #4 from dg001 at t-online dot de 2006-02-06 00:17 ---
I had a look at ISO/IEC 14882:2003(E). That is the ANSI/ISO Standard for C++.
Paragraph 3.4.2 deals with Argument-dependent name lookup.
In section 2 I read:
"The sets of namespaces and classes is determined
entirely by th
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-05 23:41 ---
This has nothing to do with ADL really.
using test::f; forces to use test::f when doing f(a) in that scope since that
is the f in that scope.
Again this is not a bug GCC.
--
pinskia at gcc dot gnu dot org change
--- Comment #2 from dg001 at t-online dot de 2006-02-05 23:14 ---
The first statement in my code doesn't use any namespace
double result1 = f(d);
So ADL should take the function with the signature (float d), which is in
global namespace.
There is of course a second statement in my co
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-05 22:22 ---
Why do you think this breaks ADL?
float is not in any namespace really.
Also you explicately said to use test::f and no other which is what the using
says to do in this scope.
if you move the using to the global sc