This is the mail archive of the
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: <email@example.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
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 18.104.22.168 - Unnamed namespaces and
the other bits.
I'm quite sure it's invalid. We're getting the name "vector" through a using declaration (based on the semantics specified in 22.214.171.124/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.