Section: 18.104.22.168 [iterator.concept.winc] Status: C++20 Submitter: Casey Carter Opened: 2020-01-07 Last modified: 2021-02-25 10:48:01 UTC
View all other issues in [iterator.concept.winc].
View all issues with C++20 status.
It's widely established that neither conversions of integral types to bool nor conversions between different integral types throw exceptions. These properties are crucial to supporting exception guarantees in algorithms, containers, and other uses of iterators and their difference types. Integer-class types must provide the same guarantees to support the same use cases as do integer types.
[2020-01-14; Daniel comments]
We probably need to think about providing the stronger guarantee that all integer-class operations are also noexcept in addition to the guarantee that they do not throw any exceptions.
The fixed wording in LWG 3358, 22.214.171.124.2 [span.cons] p9 depends on the no-throw-guarantee of integer-class conversions to integral types.
[2020-01-25 Status set to Tentatively Ready after five positive votes on the reflector.]
This wording is relative to N4842.
Modify 126.96.36.199 [iterator.concept.winc] as indicated:
[Drafting note: There's a bit of drive-by editing here to change occurrences of the meaningless "type is convertible to type" to "expression is convertible to type". Paragraph 7 only has drive-by edits. ]
Allinteger-class type sare explicitly convertible to allintegral type s andimplicitly and explicitly convertible from all integral types. Allinteger-class type sare contextually convertible to bool as if by bool( a!= I(0)) , where a is an instance of the integral-class type I.