reenable some mockups

This commit is contained in:
Naios 2015-07-02 02:29:54 +02:00
parent 530acfd439
commit 62f43ea93d
2 changed files with 19 additions and 7 deletions

View File

@ -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)...);

View File

@ -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;