feat update
Some checks failed
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 1m54s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 1m46s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 2m6s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 2m4s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 2m23s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 2m28s
Some checks failed
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 1m54s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 1m46s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 2m6s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 2m4s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 2m23s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 2m28s
This commit is contained in:
parent
22f3189603
commit
40a8ffd402
@ -3,10 +3,18 @@
|
||||
|
||||
#pragma once
|
||||
#include "sled/any.h"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace sled {
|
||||
namespace failure {
|
||||
namespace {
|
||||
template<typename F, typename... Args>
|
||||
struct is_invocable : std::is_constructible<std::function<void(Args...)>,
|
||||
std::reference_wrapper<typename std::remove_reference<F>::type>> {};
|
||||
|
||||
}// namespace
|
||||
|
||||
template<typename FailureT>
|
||||
inline FailureT
|
||||
FailureFromString(std::string &&)
|
||||
@ -29,6 +37,14 @@ FailureFromString<std::string>(std::string &&str)
|
||||
return std::move(str);
|
||||
}
|
||||
|
||||
template<typename FailureT,
|
||||
typename = typename std::enable_if<std::is_constructible<FailureT, std::string>::value>::type>
|
||||
inline FailureT
|
||||
FailureFromString(std::string &&str)
|
||||
{
|
||||
return FailureT(std::move(str));
|
||||
}
|
||||
|
||||
}// namespace failure
|
||||
|
||||
namespace future_detail {
|
||||
|
Loading…
x
Reference in New Issue
Block a user