This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Update optional star operator to be noexcept.
ClosedPublic

Authored by zoecarver on Jul 1 2021, 10:18 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG000444214f16: [libcxx] Update optional star operator to be noexcept.

Diff Detail

Event Timeline

zoecarver requested review of this revision.Jul 1 2021, 10:18 AM
zoecarver created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2021, 10:18 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
This revision was not accepted when it landed; it landed in state Needs Review.Jul 1 2021, 10:44 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

LGTM % comment, but it's major.

libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
40

Should use ASSERT_NOEXCEPT(*opt);
However, is this guaranteed by the Standard? or should this actually be a new test file in libcxx/test/libcxx/ because it's a conforming extension we're doing?
If new file, then I think one file (not four) would suffice: dereference_noexcept.compile.pass.cpp or something like that.

zoecarver added inline comments.Jul 1 2021, 10:50 AM
libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
40

LIBCPP_STATIC_ASSERT means it will only be checked for libc++. I think this is fine. I'd rather not add another file (putting it here also makes it far easier to find).