Skip to content

Commit

Permalink
let exception_wrapper::get_exception<Ex> be hinted
Browse files Browse the repository at this point in the history
Summary: The hinted variation is typically faster.

Differential Revision: D58537322

fbshipit-source-id: a072d8b8aff313dc4e077042105db49826173bb8
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jun 14, 2024
1 parent b89d90e commit ea731d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions folly/ExceptionWrapper-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ inline std::exception const* exception_wrapper::get_exception() const noexcept {

template <typename Ex>
inline Ex* exception_wrapper::get_exception() noexcept {
return exception_ptr_get_object<Ex>(ptr_);
return exception_ptr_get_object_hint<Ex>(ptr_, tag<Ex>);
}

template <typename Ex>
inline Ex const* exception_wrapper::get_exception() const noexcept {
return exception_ptr_get_object<Ex>(ptr_);
return exception_ptr_get_object_hint<Ex>(ptr_, tag<Ex>);
}

inline std::exception_ptr exception_wrapper::to_exception_ptr() const noexcept {
Expand Down

0 comments on commit ea731d6

Please sign in to comment.