Created on1999-03-09.00:00:00 last changed277 months ago
Proposed Resolution (10/99):In 13.4.3 [temp.arg.nontype] paragraph 2, change
[Note: a string literal(5.13.5 [lex.string]) is not an acceptabletemplate-argument because a string literal is an objectwith internal linkage.to
[Note: a string literal(5.13.5 [lex.string]) does not satisfy therequirements of any of these categories and thus is not anacceptabletemplate-argument.
The explanation in13.4.3 [temp.arg.nontype]paragraph 2 of why a string literal cannot beused as a template argument leaves something to be desired:
...because a string literal is an object with internal linkage.I can't find anything that says that a string literal hasinternal linkage. In fact, I'd be pretty surprised if I did,since linkage is defined (in6.7 [basic.link]) strictly in terms ofnames, and a string literal doesn't have a name.Actually, I think that it's the namelessness of a string literalthat prevents it from being a template argument; only thethird and fourth bullets of13.4.3 [temp.arg.nontype]paragraph 1 could conceivably apply,and both of those require that the entity have a name (i.e.,that they be given as anid-expression).
Proposed Resolution (10/99):In 13.4.3 [temp.arg.nontype] paragraph 2, change
[Note: a string literal(5.13.5 [lex.string]) is not an acceptabletemplate-argument because a string literal is an objectwith internal linkage.to
[Note: a string literal(5.13.5 [lex.string]) does not satisfy therequirements of any of these categories and thus is not anacceptabletemplate-argument.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-02-23 00:00:00 | admin | set | status: ready -> dr |
| 1999-09-14 00:00:00 | admin | set | messages: +msg87 |
| 1999-03-09 00:00:00 | admin | create | |