File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,20 @@ inline std::exception_ptr exception_wrapper::to_exception_ptr()
153153 return ptr_;
154154}
155155
156- inline std::exception_ptr const & exception_wrapper::exception_ptr_ref ()
157- const noexcept {
156+ inline std::exception_ptr& exception_wrapper::exception_ptr () & noexcept {
158157 return ptr_;
159158}
159+ inline std::exception_ptr const & exception_wrapper::exception_ptr ()
160+ const & noexcept {
161+ return ptr_;
162+ }
163+ inline std::exception_ptr&& exception_wrapper::exception_ptr() && noexcept {
164+ return std::move (ptr_);
165+ }
166+ inline std::exception_ptr const && exception_wrapper::exception_ptr()
167+ const && noexcept {
168+ return std::move (ptr_);
169+ }
160170
161171inline std::type_info const * exception_wrapper::type () const noexcept {
162172 return exception_ptr_get_type (ptr_);
Original file line number Diff line number Diff line change @@ -228,7 +228,11 @@ class exception_wrapper final {
228228 std::exception_ptr to_exception_ptr () const & noexcept ;
229229 // NB: Can add this back, if a good use-case arises.
230230 std::exception_ptr to_exception_ptr () && = delete;
231- std::exception_ptr const & exception_ptr_ref () const noexcept ;
231+
232+ std::exception_ptr& exception_ptr () & noexcept ;
233+ std::exception_ptr const & exception_ptr () const & noexcept ;
234+ std::exception_ptr&& exception_ptr() && noexcept ;
235+ std::exception_ptr const && exception_ptr() const && noexcept ;
232236
233237 // ! \return `true` if the wrappers point to the same exception object
234238 friend inline bool operator ==(
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ class non_value_result {
227227
228228 friend inline bool operator ==(
229229 const non_value_result& lhs, const non_value_result& rhs) {
230- return lhs.ew_ . exception_ptr_ref () == rhs.ew_ . exception_ptr_ref () ;
230+ return lhs.ew_ == rhs.ew_ ;
231231 }
232232
233233 // DO NOT USE these "legacy" functions outside of `folly` internals. Instead:
You can’t perform that action at this time.
0 commit comments