From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11743 invoked by alias); 17 May 2003 08:00:38 -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 11723 invoked by uid 48); 17 May 2003 08:00:38 -0000 Date: Sat, 17 May 2003 08:00:00 -0000 Message-ID: <20030517080038.11702.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gprentice@paradise.net.nz, nobody@gcc.gnu.org From: giovannibajo@libero.it Reply-To: giovannibajo@libero.it, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gprentice@paradise.net.nz, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10832: [2003-05-03] Cannot define an out-of-class explicit specialization of a template constructor of a specialized template class. X-SW-Source: 2003-05/txt/msg01966.txt.bz2 List-Id: Old Synopsis: spurious compiler errors for definition of explicit specialisation of template member function of explicitly specialised class New Synopsis: [2003-05-03] Cannot define an out-of-class explicit specialization of a template constructor of a specialized template class. State-Changed-From-To: open->analyzed State-Changed-By: bajo State-Changed-When: Sat May 17 08:00:38 2003 State-Changed-Why: Confirmed. I propose the following snippet to show the bug: ----------------------------------------------------- template struct Foo; template <> struct Foo { long h; template Foo(T); template void Bar(T); }; template <> void Foo::Bar(long v) { h = v; } template <> Foo::Foo(long v) { h = v; } int main() { Foo f(12L); f.Bar(12L); } ----------------------------------------------------- pr10832.cpp:23: error: `Foo' specified as declarator-id pr10832.cpp:23: error: no member function `Foo' declared in `Foo' pr10832.cpp:23: error: invalid function declaration As you can see, the definition of the specializaiton of Bar() is accepted, but the same syntax used to specialize the constructor is rejected. This is obviously a bug. Confirmed up to current mainline. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10832