mirror of
https://github.com/Naios/continuable.git
synced 2026-02-11 20:59:50 +08:00
readd post
This commit is contained in:
parent
43bf7180f2
commit
9680682c28
20
NextGen.cpp
20
NextGen.cpp
@ -344,16 +344,18 @@ auto thenImpl(Data data, Callback&& callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Data, typename NewDispatcher>
|
template<typename Data, typename NewDispatcher>
|
||||||
auto postImpl(Data&& data ,NewDispatcher&& newDispatcher) {
|
auto postImpl(Data data ,NewDispatcher&& newDispatcher) {
|
||||||
/*->ContinuableBase<typename Config::template
|
using Decoration = DefaultDecoration<ContinuableData<
|
||||||
ChangeDispatcherTo<std::decay_t<NewDispatcher>>> {
|
typename Data::Config::template
|
||||||
return{ std::move(continuation), std::move(ownership),
|
ChangeDispatcherTo<std::decay_t<NewDispatcher>>
|
||||||
std::forward<NewDispatcher>(newDispatcher) }; */
|
>>;
|
||||||
|
return ContinuableBase<Decoration>(Decoration({
|
||||||
return 0;
|
std::move(data.ownership),
|
||||||
|
std::move(data.continuation),
|
||||||
|
std::forward<NewDispatcher>(newDispatcher)
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename Decoration>
|
template<typename Decoration>
|
||||||
class ContinuableBase {
|
class ContinuableBase {
|
||||||
template<typename>
|
template<typename>
|
||||||
@ -413,7 +415,7 @@ int main(int, char**) {
|
|||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
makeTestContinuation()
|
makeTestContinuation()
|
||||||
// .post(dispatcher)
|
.post(dispatcher)
|
||||||
.then([](std::string /*str*/) {
|
.then([](std::string /*str*/) {
|
||||||
return std::make_tuple(47, 46, 45);
|
return std::make_tuple(47, 46, 45);
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user