-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
LWG-4245 Operators that interact with counted_iterator and default_sentinel_t should be noexcept
Per WG21-P3742R0 (alternative link), LWG-4245 was resolved in the June 2025 meeting. LWG-4245 specifies operators between counted_iterator and default_sentinel_t to be noexcept, and MSVC STL has already added noexcept with /* strengthened */ comments.
As these occurrences of noexcept are to become mandatory, these /* strengthened */ comments should be removed.
Lines 1314 to 1317 in 7841cf8
| _NODISCARD friend constexpr iter_difference_t<_Iter> operator-( | |
| const counted_iterator& _Left, default_sentinel_t) noexcept /* strengthened */ { | |
| return -_Left._Length; | |
| } |
Lines 1319 to 1322 in 7841cf8
| _NODISCARD friend constexpr iter_difference_t<_Iter> operator-( | |
| default_sentinel_t, const counted_iterator& _Right) noexcept /* strengthened */ { | |
| return _Right._Length; | |
| } |
Lines 1345 to 1348 in 7841cf8
| _NODISCARD friend constexpr bool operator==(const counted_iterator& _Left, default_sentinel_t) noexcept | |
| /* strengthened */ { | |
| return _Left._Length == 0; | |
| } |
This issue is intended for a new contributor (especially one new to GitHub) to get started with the simplest possible change.
Please feel free to submit a pull request if there isn't one already linked here - no need to ask for permission! 😸
You can (and should) link your pull request to this issue using GitHub's close/fix/resolve syntax.
(in the PR description not the commit message)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status