Created on 2020-01-07.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4842.
Modify [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. ]
-6-
-7-AllExpressions of integer-class typesare explicitly convertible toallany integral types and. Expressions of integral type are both implicitly and explicitly convertiblefrom all integral typesto any integer-class type. Conversions between integral and integer-class types do not exit via an exception.AllExpressions E of integer-class typesI are contextually convertible to bool as if by bool(aE != I(0)), where a is an instance of the integral-class type I.
[ 2020-01-25 Status set to Tentatively Ready after five positive votes on the reflector. ]
[ 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, [span.cons] p9 depends on the no-throw-guarantee of integer-class conversions to integral types.
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 06:37:09 | admin | set | status: ready -> immediate |
2020-01-25 14:35:08 | admin | set | messages: + msg10961 |
2020-01-25 14:35:08 | admin | set | status: new -> ready |
2020-01-14 13:40:39 | admin | set | messages: + msg10935 |
2020-01-14 13:28:51 | admin | set | messages: + msg10933 |
2020-01-07 00:00:00 | admin | create |