This is the mail archive of the
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: <email@example.com>
Benjamin Kosnik <firstname.lastname@example.org> 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 220.127.116.11 - Unnamed namespaces and
| the other bits.
g++ is right :-)
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.