mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
thoughts about a helper class
This commit is contained in:
parent
e41bd1a531
commit
88ba45dd06
14
mockup.cpp
14
mockup.cpp
@ -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...>&&)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user