Bug 224705

Summary: Consider removing Expected::operator bool
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED WONTFIX    
Severity: Normal CC: darin
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch achristensen: review-

Description Alex Christensen 2021-04-16 17:16:54 PDT
Consider removing Expected::operator bool
Comment 1 Alex Christensen 2021-04-16 17:19:23 PDT
Created attachment 426294 [details]
Patch
Comment 2 Darin Adler 2021-04-17 17:30:19 PDT
Comment on attachment 426294 [details]
Patch

Would you consider using "explicit operator bool" instead of removing it entirely? If not, what is making you want to remove it?
Comment 3 Darin Adler 2021-04-17 17:31:06 PDT
Seems like we might want to align with std::expected if we hope to move to it some day.
Comment 4 Alex Christensen 2021-04-19 08:54:52 PDT
There was a discussion in the standardization process about whether it should be included at all.  This was to show them what removing it would do to our code.  I don't think we should remove it, but this was a useful exercise.
Comment 5 Darin Adler 2021-04-19 09:28:51 PDT
Thanks for explaining!