fix dup invocable
Some checks failed
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 1m34s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 1m54s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 1m52s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 2m1s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 2m2s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 2m8s

This commit is contained in:
tqcq 2024-04-17 13:49:10 +08:00
parent 87859d8e36
commit 0a17aeb0ec
3 changed files with 8 additions and 7 deletions

View File

@ -338,7 +338,7 @@ public:
return result;
}
static Future<T, FailureT> successful(const T &value) noexcept
static Future<T, FailureT> Successful(const T &value) noexcept
{
Future<T, FailureT> result = Future<T, FailureT>::Create();
result.FillSuccess(value);

View File

@ -18,7 +18,7 @@ class Promise {
public:
using Value = T;
Promise() = default;
Promise() noexcept = default;
Promise(const Promise &) noexcept = default;
Promise(Promise &&) noexcept = default;
Promise &operator=(const Promise &) noexcept = default;

View File

@ -61,7 +61,8 @@ struct is_invocable_test {
};
template<class F, class... Args>
using is_invocable = typename std::integral_constant<bool, sizeof(is_invocable_test::test<F, Args...>(0)) == 1>::type;
using fsm_is_invocable =
typename std::integral_constant<bool, sizeof(is_invocable_test::test<F, Args...>(0)) == 1>::type;
#else
#error "fsmlite requires C++11 support."
#endif
@ -101,10 +102,10 @@ invoke(M T::*f, T1 &&obj, Args &&...args)
template<class F,
class Arg1,
class Arg2,
bool f1 = is_invocable<F>::value,
bool f2 = is_invocable<F, Arg1>::value,
bool f3 = is_invocable<F, Arg2>::value,
bool f4 = is_invocable<F, Arg1, Arg2>::value>
bool f1 = fsm_is_invocable<F>::value,
bool f2 = fsm_is_invocable<F, Arg1>::value,
bool f3 = fsm_is_invocable<F, Arg2>::value,
bool f4 = fsm_is_invocable<F, Arg1, Arg2>::value>
struct binary_fn_helper;
template<class F, class Arg1, class Arg2>