mirror of
https://github.com/Naios/continuable.git
synced 2025-12-12 06:29:55 +08:00
fix clang & gcc build
This commit is contained in:
parent
c4ffc8249e
commit
6b27bdb523
@ -38,8 +38,7 @@ namespace detail
|
||||
template<typename _CTy, typename _State = detail::EmptyContinuableState>
|
||||
class Continuable;
|
||||
|
||||
template<typename... _ATy, typename _State>
|
||||
class Continuable<std::function<void(_ATy...)>, _State>
|
||||
namespace detail
|
||||
{
|
||||
/// Corrects void return types from functional types which should be Continuable<Callback<>>
|
||||
template<typename _RTy>
|
||||
@ -56,7 +55,11 @@ class Continuable<std::function<void(_ATy...)>, _State>
|
||||
{
|
||||
typedef Continuable<_CArgs...> type;
|
||||
};
|
||||
}
|
||||
|
||||
template<typename... _ATy, typename _State>
|
||||
class Continuable<std::function<void(_ATy...)>, _State>
|
||||
{
|
||||
public:
|
||||
typedef std::function<void(Callback<_ATy...>&&)> ForwardFunction;
|
||||
|
||||
|
||||
6
test.cpp
6
test.cpp
@ -107,6 +107,12 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
typedef fu::requires_functional_constructible<std::function<void()>>::type test_assert1;
|
||||
// typedef fu::requires_functional_constructible<std::vector<int>>::type test_assert2;
|
||||
|
||||
typedef detail::convert_void_to_continuable<void> test5;
|
||||
test5* _test5 = nullptr;
|
||||
|
||||
typedef detail::convert_void_to_continuable<Continuable<Callback<SpellCastResult>>> test6;
|
||||
test6* _test6 = nullptr;
|
||||
|
||||
// auto cba2 = make_continuable(myvec);
|
||||
|
||||
std::cout << "ok" << std::endl;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user