mirror of
https://github.com/Naios/continuable.git
synced 2026-02-16 23:29:48 +08:00
build fix
This commit is contained in:
parent
d8c024840d
commit
5c2c98ca56
@ -95,19 +95,24 @@ namespace detail
|
|||||||
typedef typename result_t::CallbackFunction callback_t;
|
typedef typename result_t::CallbackFunction callback_t;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Void returning functionals
|
/// Wrap void returning functionals to returns an empty continuable.
|
||||||
template <typename _CTy>
|
template <typename _CTy>
|
||||||
auto remove_void(_CTy&& functional)
|
auto remove_void_trait(_CTy&& functional)
|
||||||
-> typename std::enable_if<typename std::is_void<typename std::result_of<_CTy>::type>::value,
|
-> typename std::enable_if<std::is_void<fu::return_type_of_t<
|
||||||
typename convert_void_to_continuable<typename std::result_of<_CTy>::type>::type>::type
|
typename std::decay<_CTy>::type>>::value,
|
||||||
|
int>::type
|
||||||
{
|
{
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non void returning functionals (route through)
|
/// Route continuable returning functionals through.
|
||||||
template <typename _CTy>
|
template <typename _CTy>
|
||||||
auto remove_void(_CTy&& functional)
|
auto remove_void_trait(_CTy&& functional)
|
||||||
-> typename std::enable_if<!typename std::is_void<typename std::result_of<_CTy>::type>::value, _CTy>::type
|
-> typename std::enable_if<!std::is_void<fu::return_type_of_t<
|
||||||
|
typename std::decay<_CTy>::type>>::value,
|
||||||
|
_CTy&&>::type
|
||||||
{
|
{
|
||||||
|
return std::forward<_CTy>(functional);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... _CTy>
|
template<typename... _CTy>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user