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: <firstname.lastname@example.org>
Benjamin Kosnik <email@example.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 18.104.22.168 - 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.