Title
"integer-like class type" is too restrictive
Status
resolved
Section
[iterator.concept.winc]
Submitter
Jonathan Wakely

Created on 2020-01-16.00:00:00 last changed 38 months ago

Messages

Date: 2021-10-23.00:00:00

[ 2021-10-23 Resolved by the adoption of P2393R1 at the October 2021 plenary. Status changed: New → Resolved. ]

Date: 2020-02-08.00:00:00

[ 2020-02-08 Issue Prioritization ]

Priority to 3 after reflector discussion.

Date: 2020-01-16.00:00:00

[iterator.concept.winc] says:

A type I is an integer-class type if it is in a set of implementation-defined class types that behave as integer types do, as defined in below.

and

A type I is integer-like if it models integral<I> or if it is an integer-class type.

Some implementations support built-in integer types that do not necessarily model std::integral, e.g. with libstdc++ whether std::is_integral_v<__int128> is true depends whether "strict" or "extensions" mode is in use. Because __int128 is not a class type, it can't be used as an integer-like type in strict mode (which effectively means it can't be used at all, to avoid unwanted ABI differences between modes).

The requirement should be relaxed to permit non-class types which are integer-like but not one of the standard integer types (nor extended integer types). If we do that, the name "integer-like class type" should probably change.

History
Date User Action Args
2021-10-23 11:04:22adminsetmessages: + msg12179
2021-10-23 11:04:22adminsetstatus: new -> resolved
2020-02-08 12:01:24adminsetmessages: + msg10988
2020-01-16 00:00:00admincreate