Title
Integer-class type should be structural type
Status
ready
Section
[iterator.concept.winc]
Submitter
Hewill Kang

Created on 2026-03-19.00:00:00 last changed 3 weeks ago

Messages

Date: 2026-07-31.16:46:35

Proposed resolution:

This wording is relative to N5054.

  1. Modify [iterator.concept.winc] as indicated:

    -9- All integer-class types are structural types ([temp.param]) that model `regular` ([concepts.object]) and three_way_comparable<strong_ordering> ([cmp.concept]). Two values of an integer-class type are template-argument-equivalent if and only if they are equal.

Date: 2026-07-31.00:00:00

[ 2026-07-31 LWG telecon; Status changed: New → Ready. ]

Date: 2026-07-15.00:00:00

[ 2026-07-30; Tim provides new wording ]

Date: 2026-05-15.00:00:00

[ 2026-05-29; Reflector poll. ]

Set priority to 3 after reflector poll.

Need additional statement clarifying when the types are template-argument-equivalent.

This wording is relative to N5032.

  1. Modify [iterator.concept.winc] as indicated:

    -9- All integer-class types are structural types ([temp.param]) that model `regular` ([concepts.object]) and three_way_comparable<strong_ordering> ([cmp.concept]).

Date: 2026-07-31.16:07:11

Currently, integer-class types are not guaranteed to be structural types, so the range of size members that return integer-class types may not be able to model tiny-range, because its size value cannot be used as a template argument even if it is a constant expression. This does not appear to be the intention.

Given that integer-class types should behave like regular integers, and those types in MSVC-STL and libstdc++ are both implemented as structural types, it would be better to be clear about the wording.

History
Date User Action Args
2026-07-31 16:46:35adminsetmessages: + msg16543
2026-07-31 16:46:35adminsetstatus: new -> ready
2026-07-31 08:45:41adminsetmessages: + msg16536
2026-05-29 08:44:59adminsetmessages: + msg16336
2026-03-21 13:54:00adminsetmessages: + msg16034
2026-03-19 00:00:00admincreate