From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11057 invoked by alias); 6 Feb 2006 00:17:42 -0000 Received: (qmail 11043 invoked by uid 48); 6 Feb 2006 00:17:39 -0000 Date: Mon, 06 Feb 2006 00:17:00 -0000 Message-ID: <20060206001739.11042.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26110] using directive breaks ADL In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dg001 at t-online dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00445.txt.bz2 List-Id: ------- 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