This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: explicit specialization in non-namespace scope
- To: ncm at cygnus dot com
- Subject: Re: explicit specialization in non-namespace scope
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Mon, 28 Sep 1998 16:01:41 -0700
- CC: egcs at cygnus dot com
- References: <3606BFC2.D2A647E1@cygnus.com>, <199809220757.AAA30938.cygnus.egcs@smtp.earthlink.net> <3608045D.97FEC96A@cygnus.com>
- Reply-to: mark at markmitchell dot com
>>>>> "Nathan" == Nathan Myers <ncm@cygnus.com> writes:
Nathan> Mark Mitchell wrote:
>> >>>>> "Nathan" == Nathan Myers <ncm@cygnus.com> writes:
Nathan> It's still not clear that the above text applies to the
Nathan> case mentioned. "In the namespace of which the enclosing
Nathan> class is a member" is satisified both outside and inside
Nathan> the class. When it means to say "not in a class or in a
Nathan> block", it says "at namespace scope" or sometimes "in
Nathan> namespace scope"; these are changed from "at global scope"
Nathan> which is what it said before we had namespaces. "In the
Nathan> namespace of" does not imply "only at namespace scope".
>> I can see the sense in your interpretation. (After all,
>> besides implementing the removal of this feature, I also
>> implemented the feature in the first place...)
I still haven't reimplemented this feature. We've hashed out most of
the details, but I now remember one of the reasons I removed the
feature: it's not allowed by the grammar provided in the appendix to
the standard. In particular, we have:
member-declaration:
decl-specifier-seqopt member-declarator-listopt ;
function-definition ;opt
::opt nested-name-specifier templateopt unqualified-id ;
using-declaration
template-declaration
The only choices which could reasonably allow an explicit
specialization are `function-definition' and `template-declaration'.
The former, however, does not allow a template paramter list (and this
would be odd, since it would prohibit declaring a specialization
in-class, but defining it out-of-class). The grammar for a
`template-declaration' specifically disallows an explicit
specialization, which is listed separately as
`explicit-specialization'.
What do you make of this?
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com