From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18408 invoked by alias); 20 Feb 2003 23:26:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18384 invoked by uid 71); 20 Feb 2003 23:26:00 -0000 Resent-Date: 20 Feb 2003 23:26:00 -0000 Resent-Message-ID: <20030220232600.18383.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, mleone@pixar.com Received: (qmail 13773 invoked by uid 48); 20 Feb 2003 23:19:25 -0000 Message-Id: <20030220231925.13772.qmail@sources.redhat.com> Date: Thu, 20 Feb 2003 23:26:00 -0000 From: mleone@pixar.com Reply-To: mleone@pixar.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9783: Can't forward reference class in argument to templated method. X-SW-Source: 2003-02/txt/msg01044.txt.bz2 List-Id: >Number: 9783 >Category: c++ >Synopsis: Can't forward reference class in argument to templated method. >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Feb 20 23:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Mark Leone >Release: g++ 3.2 >Organization: >Environment: RedHat 7.2, i686 multiprocessor >Description: The following fails to compile. Workaround is to declare forward reference to class outside the template. template class Table { public: bool Lookup(int name, class Detail* detail, Info* info) const; void Insert(int name, class Detail* detail, Info info); }; class Detail { public: int stuff; }; template bool Table::Lookup(int name, Detail* detail, Info* info) const { return true; } template void Table::Insert(int name, Detail* detail, Info info) { } >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: