fix clang & gcc build

This commit is contained in:
Denis Blank 2015-06-11 19:38:37 +02:00 committed by Naios
parent c4ffc8249e
commit 6b27bdb523
2 changed files with 11 additions and 2 deletions

View File

@ -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;

View File

@ -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;