From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29605 invoked by alias); 10 Jun 2004 14:45:33 -0000 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 Received: (qmail 29555 invoked by uid 48); 10 Jun 2004 14:45:30 -0000 Date: Thu, 10 Jun 2004 14:45:00 -0000 Message-ID: <20040610144530.29554.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040610143911.15910.king.benjamin@mh-hannover.de> References: <20040610143911.15910.king.benjamin@mh-hannover.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/15910] can't compile self defined void distance(std::vector, std::vector) X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg01281.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-06-10 14:45 ------- Jim is right -- the compiler looks into the namespace of the arguments when looking for a function 'distance' and therefore doesn't find the one in global namespace. It does find one in namespace std::, though, so tries to call it. In the process of this, it has to do some argument conversions, which fail -- this is what you get the error messages for. Jim already mentioned the correct way to write the program so that it compiles. Note that Intel's compiler also rejects this program. W. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15910