This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Remove conditional noexcepts from view_interface
ClosedPublic

Authored by Quuxplusone on Feb 9 2022, 1:29 PM.

Details

Summary

As suggested in D117966 (attn @ldionne).
These conditional noexcepts are *permitted* by the Standard (as long
as there were no mistakes in them, I guess); but not *mandated*.
The Standard doesn't put any noexcept-specifications on these member functions.
The same logic would apply to transform_view::iterator::operator*
and transform_view::iterator::operator[], but the Standard mandates
conditional noexcept on iter_move(transform_view::iterator), and
I think it doesn't make much sense to say "moving from this iterator
is conditionally noexcept but not-moving from it is noexcept(false),"
so I'm leaving transform_view alone for now.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Feb 9 2022, 1:29 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptFeb 9 2022, 1:29 PM
ldionne accepted this revision.Feb 9 2022, 1:55 PM

LGTM. This fly-by refactoring was riiiight on the limit where I would have asked for as separate NFC :-).

This revision is now accepted and ready to land.Feb 9 2022, 1:55 PM
jloser accepted this revision.Feb 9 2022, 2:10 PM

LGTM.