mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Revert "test"
This reverts commit 5ef6154afab59f887a4765d4a259f861ff13ffc4.
This commit is contained in:
parent
90e92f4808
commit
8718c5fad9
@ -24,21 +24,21 @@
|
|||||||
|
|
||||||
#include "functional_unwrap.hpp"
|
#include "functional_unwrap.hpp"
|
||||||
|
|
||||||
template<class... Args>
|
template<typename... Args>
|
||||||
using Callback = std::function<void(Args...)>;
|
using Callback = std::function<void(Args...)>;
|
||||||
|
|
||||||
template<class... Args>
|
template<typename... Args>
|
||||||
using SharedCallback = std::shared_ptr<Callback<Args...>>;
|
using SharedCallback = std::shared_ptr<Callback<Args...>>;
|
||||||
|
|
||||||
template<class... Args>
|
template<typename... Args>
|
||||||
using WeakCallback = std::weak_ptr<Callback<Args...>>;
|
using WeakCallback = std::weak_ptr<Callback<Args...>>;
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template<class... Args>
|
template<typename... Args>
|
||||||
struct do_unwrap_callback;
|
struct do_unwrap_callback;
|
||||||
|
|
||||||
template<class... Args>
|
template<typename... Args>
|
||||||
struct do_unwrap_callback<std::tuple<Args...>>
|
struct do_unwrap_callback<std::tuple<Args...>>
|
||||||
{
|
{
|
||||||
typedef Callback<Args...> CallbackType;
|
typedef Callback<Args...> CallbackType;
|
||||||
@ -48,21 +48,21 @@ namespace detail
|
|||||||
typedef WeakCallback<Args...> WeakCallbackType;
|
typedef WeakCallback<Args...> WeakCallbackType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class _CTy>
|
template<typename _CTy>
|
||||||
using unwrap_callback = do_unwrap_callback<::fu::argument_type_of_t<_CTy>>;
|
using unwrap_callback = do_unwrap_callback<::fu::argument_type_of_t<_CTy>>;
|
||||||
|
|
||||||
} // detail
|
} // detail
|
||||||
|
|
||||||
template<class _CTy>
|
template<typename _CTy>
|
||||||
using callback_of_t = typename detail::unwrap_callback<_CTy>::CallbackType;
|
using callback_of_t = typename detail::unwrap_callback<_CTy>::CallbackType;
|
||||||
|
|
||||||
template<class _CTy>
|
template<typename _CTy>
|
||||||
using shared_callback_of_t = typename detail::unwrap_callback<_CTy>::SharedCallbackType;
|
using shared_callback_of_t = typename detail::unwrap_callback<_CTy>::SharedCallbackType;
|
||||||
|
|
||||||
template<class _CTy>
|
template<typename _CTy>
|
||||||
using weak_callback_of_t = typename detail::unwrap_callback<_CTy>::WeakCallbackType;
|
using weak_callback_of_t = typename detail::unwrap_callback<_CTy>::WeakCallbackType;
|
||||||
|
|
||||||
template<class _CTy>
|
template<typename _CTy>
|
||||||
inline typename shared_callback_of_t<_CTy>
|
inline typename shared_callback_of_t<_CTy>
|
||||||
make_shared_callback(_CTy&& callback)
|
make_shared_callback(_CTy&& callback)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user