This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: unnamed namespaces and specializations
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: mark at codesourcery dot com, jason at redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: 01 Aug 2003 18:16:50 +0200
- Subject: Re: unnamed namespaces and specializations
- Organization: Integrable Solutions
- References: <20030801105417.6b194607.bkoz@redhat.com>
Benjamin Kosnik <bkoz@redhat.com> writes:
| I would dearly love it if this code below is valid.
|
| I'm getting conflicting reports: g++ says no, icc says yes. I'm not
| quite certain myself, after reading 7.3.1.1 - Unnamed namespaces and
| the other bits.
|
| Thoughts?
g++ is right :-)
14.7.3/2
An explicit specialization shall be declared in the namespace of
which the template is a member, or, for member templates, in the
namespace of which the enclosing class or enclosing class template
is a member. An explicit specialization of a member function, member
class or static data member of a class template shall be declared in
the namespace of which the class template is a member. Such a
declaration may also be a definition. If the declaration is not a
definition, the specialization may be defined later in the
name-space in which the explicit specialization was declared, or in
a namespace that encloses the one in which the explicit
specialization was declared.
The first sentence is the most relevant here.
-- Gaby