Skip to content

Commit

Permalink
Fix the overloading resolution error caused by missing type declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
levalup committed Jun 28, 2024
1 parent b250833 commit d14de05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/uvcxx/utils/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ namespace uvcxx {
std::is_base_of<std::exception, E>::value,
int>::type = 0>
self &except(std::function<void(const E &)> f) {
return this->except([UVCXX_CAPTURE_MOVE(f)](const std::exception_ptr &p) -> bool {
return this->except(on_except_t([UVCXX_CAPTURE_MOVE(f)](const std::exception_ptr &p) -> bool {
try {
std::rethrow_exception(p);
} catch (const E &e) {
Expand All @@ -231,7 +231,7 @@ namespace uvcxx {
} catch (...) {
return false;
}
});
}));
}

template<typename E, typename std::enable_if<
Expand Down
4 changes: 2 additions & 2 deletions include/uvcxx/utils/promise.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ namespace uvcxx {
std::is_base_of<std::exception, E>::value,
int>::type = 0>
self &except(std::function<void(const E &)> f) {
return this->except([UVCXX_CAPTURE_MOVE(f)](const std::exception_ptr &p) -> bool {
return this->except(on_except_t([UVCXX_CAPTURE_MOVE(f)](const std::exception_ptr &p) -> bool {
try {
std::rethrow_exception(p);
} catch (const E &e) {
Expand All @@ -231,7 +231,7 @@ namespace uvcxx {
} catch (...) {
return false;
}
});
}));
}

template<typename E, typename std::enable_if<
Expand Down

0 comments on commit d14de05

Please sign in to comment.