mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
some corrections
This commit is contained in:
parent
959bc87d00
commit
cada3d628a
@ -45,7 +45,7 @@ namespace detail
|
|||||||
static auto create()
|
static auto create()
|
||||||
-> Callback<Args...>
|
-> Callback<Args...>
|
||||||
{
|
{
|
||||||
return [](Args...)
|
return [](Args&&...)
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ namespace fu
|
|||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
/// Implementation of invoke_with_tuple
|
/// Implementation of invoke_from_tuple
|
||||||
template<typename Sequence>
|
template<typename Sequence>
|
||||||
struct invoker;
|
struct invoker;
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ namespace fu
|
|||||||
|
|
||||||
/// Invokes a function type with the given tuple arguments.
|
/// Invokes a function type with the given tuple arguments.
|
||||||
template<typename _FTy, typename _TTy>
|
template<typename _FTy, typename _TTy>
|
||||||
inline auto invoke_with_tuple(_FTy&& functional, _TTy&& tuple)
|
inline auto invoke_from_tuple(_FTy&& functional, _TTy&& tuple)
|
||||||
-> return_type_of_t<typename std::decay<_FTy>::type>
|
-> return_type_of_t<typename std::decay<_FTy>::type>
|
||||||
{
|
{
|
||||||
return detail::invoker<
|
return detail::invoker<
|
||||||
|
|||||||
2
test.cpp
2
test.cpp
@ -332,7 +332,7 @@ int main(int /*argc*/, char** /*argv*/)
|
|||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
fu::invoke_with_tuple(lam, std::move(myargs));
|
fu::invoke_from_tuple(lam, std::move(myargs));
|
||||||
|
|
||||||
fu::sequence_generator<2>::type seqtype;
|
fu::sequence_generator<2>::type seqtype;
|
||||||
fu::sequence_generator<1>::type zero_seqtype;
|
fu::sequence_generator<1>::type zero_seqtype;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user