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

### 709. `char_traits::not_eof` has wrong signature

Section: 23.2.4 [char.traits.specializations] Status: CD1 Submitter: Bo Persson Opened: 2007-08-13 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [char.traits.specializations].

View all issues with CD1 status.

Discussion:

The changes made for `constexpr` in 23.2.4 [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, 23.2.2 [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.

Proposed resolution:

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

>     static constexpr int_type not_eof(char_type int_type c);

[ Bellevue: ]

> Resolution: NAD editorial - up to Pete's judgment

[ Post Sophia Antipolis ]

> Moved from Pending NAD Editorial to Review. The proposed wording appears to be correct but non-editorial.