This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: unnamed namespaces and specializations
- From: Doug Gregor <dgregor at apple dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: mark at codesourcery dot com, jason at redhat dot com, gdr at integrable-solutions dot net, libstdc++ at gcc dot gnu dot org
- Date: Fri, 1 Aug 2003 09:08:50 -0700
- Subject: Re: unnamed namespaces and specializations
- References: <20030801105417.6b194607.bkoz@redhat.com>
Comeau says no:
"ComeauTest.c", line 20: error: the initial explicit specialization of class
"std::<unnamed>::vector<useless>" must be declared in the namespace
containing the template
class vector<useless>
On Friday, August 1, 2003, at 8:54AM, Benjamin Kosnik wrote:
I would dearly love it if this code below is valid.
You and me both.
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?
I'm quite sure it's invalid. We're getting the name "vector" through a using declaration (based on the semantics specified in 7.3.1.1/1), and you can't specialize through using declarations. We'd have to reopen the namespace "unique" to specialize vector, but that's not possible.
Doug