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


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
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]