thoughts about a helper class

This commit is contained in:
Denis Blank 2015-08-09 13:59:53 +02:00 committed by Naios
parent babdee7325
commit 5636e67a3a

View File

@ -42,12 +42,26 @@ struct Continuable
}
};
// helper class
struct Continuables
{
static Continuable<> create_empty()
{
return make_continuable([](std::function<void()>&& callback)
{
callback();
});
}
};
template <typename... Args>
Continuable<> make_continuable(Args&&...)
{
return Continuable<>();
}
template <typename... LeftArgs, typename... RightArgs>
Continuable<> operator&& (Continuable<LeftArgs...>&&, Continuable<RightArgs...>&&)
{