mirror of
https://github.com/Naios/continuable.git
synced 2026-02-09 11:16:40 +08:00
some work on boxing
This commit is contained in:
parent
a9f480cf41
commit
fbe2340fa0
@ -58,6 +58,10 @@ namespace detail
|
|||||||
template<typename _NextRTy, typename... _NextATy>
|
template<typename _NextRTy, typename... _NextATy>
|
||||||
struct unary_chainer;
|
struct unary_chainer;
|
||||||
|
|
||||||
|
// multiple_all_chainer forward declaration.
|
||||||
|
template<typename... _CTy>
|
||||||
|
struct multiple_all_chainer;
|
||||||
|
|
||||||
// creates an empty callback.
|
// creates an empty callback.
|
||||||
template<typename _FTy>
|
template<typename _FTy>
|
||||||
struct create_empty_callback;
|
struct create_empty_callback;
|
||||||
@ -95,6 +99,11 @@ namespace detail
|
|||||||
typedef typename result_t::CallbackFunction callback_t;
|
typedef typename result_t::CallbackFunction callback_t;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename... _CTy>
|
||||||
|
struct multiple_all_chainer<_CTy...>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
template <typename _CTy>
|
template <typename _CTy>
|
||||||
using unary_chainer_t = unary_chainer<
|
using unary_chainer_t = unary_chainer<
|
||||||
fu::return_type_of_t<typename std::decay<_CTy>::type>,
|
fu::return_type_of_t<typename std::decay<_CTy>::type>,
|
||||||
@ -261,10 +270,20 @@ namespace detail
|
|||||||
return then(box_continuable(std::forward<_CTy>(continuable)));
|
return then(box_continuable(std::forward<_CTy>(continuable)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename... _CTy>
|
||||||
|
static void _all(_CTy&&...)
|
||||||
|
{
|
||||||
|
typedef multiple_all_chainer<_CTy...> type;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// Placeholder
|
/// Placeholder
|
||||||
template<typename... _CTy>
|
template<typename... _CTy>
|
||||||
_ContinuableImpl& all(_CTy&&...)
|
_ContinuableImpl& all(_CTy&&... functionals)
|
||||||
{
|
{
|
||||||
|
typedef multiple_all_chainer<_CTy...> type;
|
||||||
|
|
||||||
|
_all(box_continuable(std::forward<_CTy>(functionals))...);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user