Title
Class ctype_byname<char> redundant and misleading
Status
nad
Section
[locale.codecvt]
Submitter
Angelika Langer

Created on 1999-03-18.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

The standard as written is mildly misleading, but the correct fix is to deal with the underlying problem in the ctype_byname base class, not in the specialization. See issue 228.

Date: 2010-10-21.18:28:33

[ 2009-07 Frankfurt ]

Moved to NAD.

Date: 2010-10-21.18:28:33

[ Summit: ]

Reopened by Alisdair.

Date: 1999-03-18.00:00:00

Section [locale.codecvt] specifies that ctype_byname<char> must be a specialization of the ctype_byname template.

It is common practice in the standard that specializations of class templates are only mentioned where the interface of the specialization deviates from the interface of the template that it is a specialization of. Otherwise, the fact whether or not a required instantiation is an actual instantiation or a specialization is left open as an implementation detail.

Clause 22.2.1.4 deviates from that practice and for that reason is misleading. The fact, that ctype_byname<char> is specified as a specialization suggests that there must be something "special" about it, but it has the exact same interface as the ctype_byname template. Clause 22.2.1.4 does not have any explanatory value, is at best redundant, at worst misleading - unless I am missing anything.

Naturally, an implementation will most likely implement ctype_byname<char> as a specialization, because the base class ctype<char> is a specialization with an interface different from the ctype template, but that's an implementation detail and need not be mentioned in the standard.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1658
2010-10-21 18:28:33adminsetmessages: + msg1657
2010-10-21 18:28:33adminsetmessages: + msg1656
1999-03-18 00:00:00admincreate