-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark some folly::Try functions are noexcept
Summary: These functions are intended not to throw and they do not throw, so lets mark them as non-throwing. `hasValue()` and `hasException()` are self-explanatory. `tryGetExceptionObject()` returns `nullptr` on failure, which is similarly self-explanatory. `makeTryWith(F&&)` is intended not to throw and never throws in practice. Caveat: this function never throws in practice as of C++17 and its syntactic copy-elision of returned temporaries, but may have thrown in practice before C++17 for `Try<T>` in cases where `T` is not noexcept-move-constructible. Reviewed By: yfeldblum Differential Revision: D62713625 fbshipit-source-id: 9e91fee5b56da5c366dc6120ed5648afbae6e02c
- Loading branch information
1 parent
b6e67d7
commit c6b96b2
Showing
2 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters