c++/2566
lerdsuwa@gcc.gnu.org
lerdsuwa@gcc.gnu.org
Fri Apr 20 07:46:00 GMT 2001
The following reply was made to PR c++/2566; it has been noted by GNATS.
From: lerdsuwa@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, mgeddes@cybergraphic.com.au, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/2566
Date: 20 Apr 2001 14:40:31 -0000
Synopsis: Template specialisations & Namespace problems
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Apr 20 07:40:31 2001
State-Changed-Why:
Not a bug. According to the standard, section 14.7.3 para 2:
An explicit specialization shall be declared in the
namespace of which the template is a member ...
If the declaration is not a definition, the specialization
may be defined later in the namespace in which the
explicit specialization was declared, or in a namespace
that encloses the one in which the explicit specialization
was declared.
So the specialization "not_zero<0>" must be declared
first inside the "impl" namespace first before it is
defined outside "impl" namespace.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2566&database=gcc
More information about the Gcc-prs
mailing list