cpp/string/char traits/not eof

Given, produce a suitable value that is not equivalent to eof.

Formally
 * if is, returns ,
 * otherwise, returns a value such that  is.

This function is typically used when a value other than eof needs to be returned, such as in implementations of std.

Return value
if and eof value are not equivalent, returns some other non-eof value otherwise.

Complexity
Constant.