Skip to content

Commit

Permalink
Back out "cut references to exception_wrapper::hasThrownException"
Browse files Browse the repository at this point in the history
Summary: Also backed out D28276400 (b246430) because it has a dependency to D26331579 (aa7f74a)

Reviewed By: lhuang04, JunqiWang

Differential Revision: D28309181

fbshipit-source-id: 0e04e00c59d497290aa0067177a51fe1cfc5e144
  • Loading branch information
Crystal Jin authored and facebook-github-bot committed May 8, 2021
1 parent b246430 commit 270a797
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions folly/ExceptionWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,12 @@ class exception_wrapper final {
~exception_wrapper();

//! \post `!ptr || bool(*this)`
//! \post `hasThrownException() == bool(ptr)`
explicit exception_wrapper(std::exception_ptr const& ptr) noexcept;
explicit exception_wrapper(std::exception_ptr&& ptr) noexcept;

//! \pre `ptr` holds a reference to `ex`.
//! \post `hasThrownException() == true`
//! \post `bool(*this)`
//! \post `type() == typeid(ex)`
template <class Ex>
Expand All @@ -407,6 +409,7 @@ class exception_wrapper final {

//! \pre `typeid(ex) == typeid(typename decay<Ex>::type)`
//! \post `bool(*this)`
//! \post `hasThrownException() == false`
//! \post `type() == typeid(ex)`
//! \note Exceptions of types derived from `std::exception` can be implicitly
//! converted to an `exception_wrapper`.
Expand All @@ -419,6 +422,7 @@ class exception_wrapper final {

//! \pre `typeid(ex) == typeid(typename decay<Ex>::type)`
//! \post `bool(*this)`
//! \post `hasThrownException() == false`
//! \post `type() == typeid(ex)`
//! \note Exceptions of types not derived from `std::exception` can still be
//! used to construct an `exception_wrapper`, but you must specify
Expand Down

0 comments on commit 270a797

Please sign in to comment.