diff --git a/src/sled/futures/internal/failure_handling.h b/src/sled/futures/internal/failure_handling.h index 79e1491..eda6d5f 100644 --- a/src/sled/futures/internal/failure_handling.h +++ b/src/sled/futures/internal/failure_handling.h @@ -3,10 +3,18 @@ #pragma once #include "sled/any.h" +#include #include namespace sled { namespace failure { +namespace { +template +struct is_invocable : std::is_constructible, + std::reference_wrapper::type>> {}; + +}// namespace + template inline FailureT FailureFromString(std::string &&) @@ -29,6 +37,14 @@ FailureFromString(std::string &&str) return std::move(str); } +template::value>::type> +inline FailureT +FailureFromString(std::string &&str) +{ + return FailureT(std::move(str)); +} + }// namespace failure namespace future_detail {