mirror of
https://github.com/Naios/continuable.git
synced 2026-02-09 11:16:40 +08:00
Fix some permissive issues
This commit is contained in:
parent
e3e119b59d
commit
a7d844d0dc
@ -504,7 +504,7 @@ auto chain_continuation(Continuation&& continuation, Callback&& callback,
|
|||||||
static_assert(is_continuable<std::decay_t<Continuation>>{},
|
static_assert(is_continuable<std::decay_t<Continuation>>{},
|
||||||
"Expected a continuation!");
|
"Expected a continuation!");
|
||||||
|
|
||||||
using Hint = decltype(hints::hint_of(traits::identity_of(continuation)));
|
using Hint = decltype(hints::hint_of(traits::identify<Continuation>()));
|
||||||
constexpr auto next_hint =
|
constexpr auto next_hint =
|
||||||
next_hint_of(std::integral_constant<handle_results, HandleResults>{},
|
next_hint_of(std::integral_constant<handle_results, HandleResults>{},
|
||||||
traits::identify<decltype(callback)>{}, Hint{});
|
traits::identify<decltype(callback)>{}, Hint{});
|
||||||
|
|||||||
@ -113,9 +113,9 @@ struct check_pack_empty {
|
|||||||
/// A callable object to determine the shared result between all continuations
|
/// A callable object to determine the shared result between all continuations
|
||||||
struct determine_shared_result {
|
struct determine_shared_result {
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
constexpr auto operator()(T&... args) const noexcept {
|
constexpr auto operator()(T&&...) const noexcept {
|
||||||
return common_result_of(hints::signature_hint_tag<>{},
|
return common_result_of(hints::signature_hint_tag<>{},
|
||||||
hints::hint_of(traits::identity_of(args))...);
|
hints::hint_of(traits::identify<T>())...);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -126,5 +126,6 @@ int main(int, char**) {
|
|||||||
cti::make_ready_continuable(0, 1), 2)
|
cti::make_ready_continuable(0, 1), 2)
|
||||||
.then([](int a0, int a1, int a2) {
|
.then([](int a0, int a1, int a2) {
|
||||||
// ...
|
// ...
|
||||||
|
util::unused(a0, a1, a2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user