mirror of
https://github.com/Naios/continuable.git
synced 2026-02-10 20:29:49 +08:00
test weak callback container
This commit is contained in:
parent
f5c651d2aa
commit
092f83f74b
@ -107,7 +107,7 @@ namespace fu
|
|||||||
typedef unwrap_function_impl<_RTy(_ATy...)> type;
|
typedef unwrap_function_impl<_RTy(_ATy...)> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename>
|
template<typename>
|
||||||
struct to_true
|
struct to_true
|
||||||
: std::true_type { };
|
: std::true_type { };
|
||||||
|
|
||||||
|
|||||||
8
test.cpp
8
test.cpp
@ -53,8 +53,6 @@ int main(int /*argc*/, char** /*argv*/)
|
|||||||
// callback(SPELL_FAILED_SUCCESS);
|
// callback(SPELL_FAILED_SUCCESS);
|
||||||
};
|
};
|
||||||
|
|
||||||
// static_assert(std::is_void<decltype(lam)>::value, "blub");
|
|
||||||
|
|
||||||
fu::function_type_of_t<decltype(lam)> fun1;
|
fu::function_type_of_t<decltype(lam)> fun1;
|
||||||
fun1 = lam;
|
fun1 = lam;
|
||||||
fun1(Callback<SpellCastResult>());
|
fun1(Callback<SpellCastResult>());
|
||||||
@ -66,7 +64,13 @@ int main(int /*argc*/, char** /*argv*/)
|
|||||||
|
|
||||||
make_weak_wrapped_callback(sc1);
|
make_weak_wrapped_callback(sc1);
|
||||||
make_weak_wrapped_callback(sc2);
|
make_weak_wrapped_callback(sc2);
|
||||||
|
|
||||||
|
WeakCallbackContainer callback;
|
||||||
|
|
||||||
|
auto weakCallback = callback([]
|
||||||
|
{
|
||||||
|
});
|
||||||
|
|
||||||
typedef Continuable<bool> cont123;
|
typedef Continuable<bool> cont123;
|
||||||
|
|
||||||
typedef Continuable<Callback<bool>> myty1;
|
typedef Continuable<Callback<bool>> myty1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user