mirror of
https://github.com/Naios/continuable.git
synced 2025-12-07 17:26:47 +08:00
reenable some mockups
This commit is contained in:
parent
530acfd439
commit
62f43ea93d
@ -195,15 +195,15 @@ public:
|
||||
|
||||
/// Placeholder
|
||||
template<typename... _CTy>
|
||||
Continuable& some(std::size_t const count, _CTy&&...)
|
||||
Continuable some(std::size_t const count, _CTy&&...)
|
||||
{
|
||||
return *this;
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// Placeholder
|
||||
template<typename... _CTy>
|
||||
auto any(_CTy&&... functionals)
|
||||
-> Continuable& // FIXME gcc build &-> decltype(some(1, std::declval<_CTy>()...))
|
||||
-> Continuable // FIXME gcc build &-> decltype(some(1, std::declval<_CTy>()...))
|
||||
{
|
||||
// Equivalent to invoke `some` with count 1.
|
||||
return some(1, std::forward<_CTy>(functionals)...);
|
||||
|
||||
20
test.cpp
20
test.cpp
@ -135,7 +135,7 @@ inline auto apply(F && f, T && t)
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
/*
|
||||
|
||||
CastSpellPromise(1)
|
||||
.then([](SpellCastResult)
|
||||
{
|
||||
@ -184,7 +184,7 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
std::cout << "Finished" << std::endl;
|
||||
});
|
||||
*/
|
||||
|
||||
//Continuable<bool> cb = make_continuable([](Callback<bool>&& callback)
|
||||
//{
|
||||
|
||||
@ -378,17 +378,29 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
});
|
||||
*/
|
||||
|
||||
auto promise = std::move(make_continuable()
|
||||
auto promise = make_continuable()
|
||||
.all(
|
||||
[]
|
||||
{
|
||||
|
||||
// void
|
||||
return CastSpellPromise(10);
|
||||
},
|
||||
[]
|
||||
{
|
||||
|
||||
return CastSpellPromise(20);
|
||||
}));
|
||||
})
|
||||
.then([](SpellCastResult, SpellCastResult)
|
||||
{
|
||||
|
||||
|
||||
})
|
||||
.then([]
|
||||
{
|
||||
|
||||
|
||||
});
|
||||
|
||||
std::cout << "ok" << std::endl;
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user