From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32406 invoked by alias); 14 Nov 2002 06:56:01 -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 32387 invoked by uid 71); 14 Nov 2002 06:56:01 -0000 Resent-Date: 14 Nov 2002 06:56:01 -0000 Resent-Message-ID: <20021114065601.32386.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, Delana.Lorenzo@libero.it Received: (qmail 27900 invoked by uid 61); 14 Nov 2002 06:49:05 -0000 Message-Id: <20021114064905.27899.qmail@sources.redhat.com> Date: Wed, 20 Nov 2002 07:37:00 -0000 From: Delana.Lorenzo@libero.it Reply-To: Delana.Lorenzo@libero.it To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8578: cast typename operator X-SW-Source: 2002-11/txt/msg00650.txt.bz2 List-Id: >Number: 8578 >Category: c++ >Synopsis: cast typename operator >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Nov 13 22:56:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Delana.Lorenzo@libero.it >Release: gcc-3.2 >Organization: >Environment: Linux >Description: #include using namespace std; template class A { public: typedef typename K::val val; operator val (); }; template A::operator val () { printf ("cast operator\n"); } struct myval{ typedef int val; }; int main () { A a; (int)a; } /* if you define in the class header the cast operator you don't get error like this: template_cast_op.cxx:13: warning: `typename A::val' is implicitly a typename template_cast_op.cxx:13: warning: implicit typename is deprecated, please see the documentation for details template_cast_op.cxx:14: no `A::operator K::val()' member function declared in class `A' template_cast_op.cxx:14: template definition of non-template `A::operator K::val()' */ >How-To-Repeat: compile this source code >Fix: >Release-Note: >Audit-Trail: >Unformatted: