mirror of
https://github.com/Naios/continuable.git
synced 2026-02-07 18:26:40 +08:00
reenable some mockups
This commit is contained in:
parent
530acfd439
commit
62f43ea93d
@ -195,15 +195,15 @@ public:
|
|||||||
|
|
||||||
/// Placeholder
|
/// Placeholder
|
||||||
template<typename... _CTy>
|
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
|
/// Placeholder
|
||||||
template<typename... _CTy>
|
template<typename... _CTy>
|
||||||
auto any(_CTy&&... functionals)
|
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.
|
// Equivalent to invoke `some` with count 1.
|
||||||
return some(1, std::forward<_CTy>(functionals)...);
|
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*/)
|
int main(int /*argc*/, char** /*argv*/)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
CastSpellPromise(1)
|
CastSpellPromise(1)
|
||||||
.then([](SpellCastResult)
|
.then([](SpellCastResult)
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ int main(int /*argc*/, char** /*argv*/)
|
|||||||
{
|
{
|
||||||
std::cout << "Finished" << std::endl;
|
std::cout << "Finished" << std::endl;
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
//Continuable<bool> cb = make_continuable([](Callback<bool>&& callback)
|
//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(
|
.all(
|
||||||
[]
|
[]
|
||||||
{
|
{
|
||||||
|
|
||||||
// void
|
// void
|
||||||
return CastSpellPromise(10);
|
return CastSpellPromise(10);
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
{
|
{
|
||||||
|
|
||||||
return CastSpellPromise(20);
|
return CastSpellPromise(20);
|
||||||
}));
|
})
|
||||||
|
.then([](SpellCastResult, SpellCastResult)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.then([]
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
std::cout << "ok" << std::endl;
|
std::cout << "ok" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user