This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.

830. Incomplete list of char_traits specializations

Section: 23.2 [char.traits] Status: NAD Editorial Submitter: Dietmar Kühl Opened: 2008-04-23 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [char.traits].

View all issues with NAD Editorial status.

Discussion:

Paragraph 4 of 23.2 [char.traits] mentions that this section specifies two specializations (char_traits<char> and (char_traits<wchar_t>). However, there are actually four specializations provided, i.e. in addition to the two above also char_traits<char16_t> and char_traits<char32_t>). I guess this was just an oversight and there is nothing wrong with just fixing this.

[ Alisdair adds: ]

char_traits< char16/32_t > should also be added to <ios_fwd> in 31.3 [iostream.forward], and all the specializations taking a char_traits parameter in that header.

[ Sophia Antipolis: ]

Idea of the issue is ok.

Alisdair to provide wording, once that wording arrives, move to review.

[ 2009-05-04 Alisdair adds: ]

The main point of the issue was resolved editorially in N2723, so we are close to NAD Editorial. However, exploring the issue we found a second tweak was necessary for <iosfwd> and that is still outstanding, so here are the words I am long overdue delivering:

[ Howard: I've put Alisdair's words into the proposed wording section and moved the issue to Review. ]

[ Original proposed wording. ]

Replace paragraph 4 of 23.2 [char.traits] by:

This subclause specifies a struct template, char_traits<charT>, and four explicit specializations of it, char_traits<char>, char_traits<char16_t>, char_traits<char32_t>, and char_traits<wchar_t>, all of which appear in the header <string> and satisfy the requirements below.

[ Batavia (2009-05): ]

We agree. Move to NAD Editorial.

Proposed resolution:

Change Forward declarations 31.3 [iostream.forward]:

Header <iosfwd> synopsis

namespace std {
   template<class charT> class char_traits;
   template<> class char_traits<char>;
   template<> class char_traits<char16_t>;
   template<> class char_traits<char32_t>;
   template<> class char_traits<wchar_t>;
...
}