From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19846 invoked by alias); 11 Apr 2002 16:56:05 -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 19770 invoked by uid 71); 11 Apr 2002 16:56:03 -0000 Resent-Date: 11 Apr 2002 16:56:03 -0000 Resent-Message-ID: <20020411165603.19769.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, wolfgang.bangerth@iwr.uni-heidelberg.de Received:(qmail 19642 invoked by uid 61); 11 Apr 2002 16:55:52 -0000 Message-Id:<20020411165552.19641.qmail@sources.redhat.com> Date: Thu, 11 Apr 2002 09:56:00 -0000 From: wolfgang.bangerth@iwr.uni-heidelberg.de Reply-To: wolfgang.bangerth@iwr.uni-heidelberg.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6259: Explicit instantiation of template constructor not allowed X-SW-Source: 2002-04/txt/msg00618.txt.bz2 List-Id: >Number: 6259 >Category: c++ >Synopsis: Explicit instantiation of template constructor not allowed >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Apr 11 09:56:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: all gcc versions >Organization: >Environment: Linux, Sparc >Description: The following snippet does not compile, although I believe that it should. If instead of the constructor a regular function is used, it works. ----------------------------------------- template struct T {}; struct X { template X (T &) {}; }; template X::X<> (T<2> &); ------------------------------------- x.cc:6: `X' is not a template x.cc:6: ISO C++ forbids declaration of `type name' with no type x.cc:6: abstract declarator `int (X::)(T<2>&)' used as declaration x.cc:6: no member function `._0' declared in `X' >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: