"Basic integral types" should not be used
Jiang An

Created on 2022-05-07.00:00:00 last changed 6 months ago


Date: 2022-05-15.00:00:00

[ 2022-05-17; Reflector poll ]

Set priority to 3 after reflector poll.

Date: 2022-05-07.00:00:00

Raised from editorial issue #5240.

The phrase "signed basic integral types" in [stream.types] has been present since C++98 but never defined. It is unclear whether "basic integral types" are "standard integer types" or "integer types" (including extended integer types).

As std::streamoff should be wide enough to represent the largest possible file size, and std::uintmax_t is used as the return type of std::filesystem::file_size, we should not disallow std::streamoff to be an extended integer type which may be wider than long long. On the other hand, as std::size_t and std::ptrdiff_t have already been allowed to be extended integer types, std::streamsize should also be allowed to be an extended integer type for consistency.

So I think we should just use "signed integer types" instead of "signed basic integral types" in [stream.types].

Date User Action Args
2022-05-17 11:58:16adminsetmessages: + msg12467
2022-05-07 00:00:00admincreate