Fix ExceptionWrapper::with_exception to support lvalue ref functors
Summary: [Folly] Fix `ExceptionWrapper::with_exception` to support lvalue ref functors.
Ex:
auto handler = [&](const std::runtime_error& e) { handle_runtime_error(e); };
exception_wrapper wrap = get_some_exception_wrapper_from_context();
wrap.with_exception(handler); // broken before this diff, fixed after
Reviewed By: markisaa
Differential Revision: D2698680
fb-gh-sync-id: 4976ba08e3601e22891d00d79a5dae5118887b71
Showing
Please register or sign in to comment