unix build fix

This commit is contained in:
Denis Blank 2015-06-16 02:24:16 +02:00 committed by Naios
parent 41def1a390
commit cb56f19906

View File

@ -96,36 +96,6 @@ namespace detail
}
};
template<>
struct convert_void_to_continuable<void>
{
typedef _ContinuableImpl<DefaultContinuableState, Callback<>> type;
template<typename Fn, typename... Args>
static type invoke(Fn functional, Args... args)
{
// Invoke the void returning functional
functional(std::forward<Args>(args)...);
// Return a fake void continuable
return type([](Callback<>&&)
{
});
}
};
template<typename _State, typename _CTy>
struct convert_void_to_continuable<_ContinuableImpl<_State, _CTy>>
{
typedef _ContinuableImpl<_State, _CTy> type;
template<typename Fn, typename... Args>
static type invoke(Fn functional, Args... args)
{
return functional(std::forward<Args>(args)...);
}
};
template<typename... _STy, typename... _ATy>
class _ContinuableImpl<ContinuableState<_STy...>, std::function<void(_ATy...)>>
{
@ -251,6 +221,36 @@ namespace detail
return *this;
}
};
template<>
struct convert_void_to_continuable<void>
{
typedef _ContinuableImpl<DefaultContinuableState, Callback<>> type;
template<typename Fn, typename... Args>
static type invoke(Fn functional, Args... args)
{
// Invoke the void returning functional
functional(std::forward<Args>(args)...);
// Return a fake void continuable
return type([](Callback<>&&)
{
});
}
};
template<typename _State, typename _CTy>
struct convert_void_to_continuable<_ContinuableImpl<_State, _CTy>>
{
typedef _ContinuableImpl<_State, _CTy> type;
template<typename Fn, typename... Args>
static type invoke(Fn functional, Args... args)
{
return functional(std::forward<Args>(args)...);
}
};
}
/// A continuable provides useful methods to react on the result of callbacks