This is an archive of the discontinued LLVM Phabricator instance.

[libc] Remove operator T from cpp::expected.
ClosedPublic

Authored by lntue on Jun 6 2023, 7:13 AM.

Details

Summary

The libc's equivalent of std::expected has a non-standard and
non-explicit operator T - https://github.com/llvm/llvm-project/issues/62738

Diff Detail

Event Timeline

lntue created this revision.Jun 6 2023, 7:13 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 6 2023, 7:13 AM
Herald added a subscriber: tschuett. · View Herald Transcript
lntue requested review of this revision.Jun 6 2023, 7:13 AM
sivachandra accepted this revision.Jun 6 2023, 10:23 AM
sivachandra added inline comments.
libc/src/__support/File/dir.cpp
23

Is using *fd more idiomatic?

This revision is now accepted and ready to land.Jun 6 2023, 10:23 AM
lntue added inline comments.Jun 6 2023, 10:56 AM
libc/src/__support/File/dir.cpp
23

I'm not sure if it's more idiomatic, but most places in our code base are already using .value(). Either usage is fine with me.

This revision was automatically updated to reflect the committed changes.