This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unnamed namespaces and specializations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]