From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28569 invoked by alias); 24 May 2004 02:02:09 -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 6502 invoked by uid 48); 24 May 2004 01:34:57 -0000 Date: Tue, 25 May 2004 00:03:00 -0000 From: "igodard at pacbell dot net" To: gcc-bugs@gcc.gnu.org Message-ID: <20040524013452.15625.igodard@pacbell.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/15625] New: Sails to find static function X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg02719.txt.bz2 List-Id: enum Relation {equalOp}; template class A { public: static bool Relop(const A&, const A&, Relation); friend bool operator==(const A& a1, const A& a2) { return Relop(a1, a2, equalOp); } B* b; }; int main() { A a; a == a; return 0; } produces: foo.cc: In function `bool operator==(const A&, const A&)': foo.cc:16: instantiated from here foo.cc:10: error: no matching function for call to `A::Relop(const A&, const A&, Relation)' foo.cc:6: note: candidates are: static bool A::Relop(const A&, const A&, Relation) Even if this code is actually invalid (who could tell except the committee?) the error message should at least indicate what is really wrong. Ivan -- Summary: Sails to find static function Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15625