------- 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 the types of the function arguments (and the namespace of any
template template argument).
Typedef names and using-declarations used to specify the types do not
contribute to this set."

So a using-declaration should not alter the way argument-dependent name lookup
works.

I came across this issue when I tried to compile an example from Scott Myers,
"Effective C++", 3rd edition, item 25. There is a using-declaration on page
110, that doesn't work with gcc version 4.0.2.

Again, the using-declaration only makes the function, if it be my f(...), Myers
or stl's swap(...), visible in the scope. But the compiler takes the arguments
of the function call into consideration, which of the visible functions fits
best.

The example I gave above is very simplified. But you can replace the
fundamental types of double and float with real classes, and the problem
persits.

I just didn't want to post the contents of 5 files (header + implementation)
here.

I'd be glad, if you looked up my references. I still claim that the
beforementioned version of gcc doesn't conform to the C++ standard.


-- 

dg001 at t-online dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26110

Reply via email to