Title
char_traits::not_eof has wrong signature
Status
cd1
Section
[char.traits.specializations]
Submitter
Bo Persson

Created on 2007-08-13.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the signature in [char.traits.specializations.char], [char.traits.specializations.char16_t], [char.traits.specializations.char32_t], and [char.traits.specializations.wchar.t] to

static constexpr int_type not_eof(char_type int_type c);
Date: 2007-08-13.00:00:00

The changes made for constexpr in [char.traits.specializations] have not only changed the not_eof function from pass by const reference to pass by value, it has also changed the parameter type from int_type to char_type.

This doesn't work for type char, and is inconsistent with the requirements in Table 56, Traits requirements, [char.traits.require].

Pete adds:

For what it's worth, that may not have been an intentional change. N2349, which detailed the changes for adding constant expressions to the library, has strikeout bars through the const and the & that surround the char_type argument, but none through char_type itself. So the intention may have been just to change to pass by value, with text incorrectly copied from the standard.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3505
2007-08-13 00:00:00admincreate