From 40a8ffd402b456b3dcd0086ebc5b88a30f8246e4 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:51:12 +0000 Subject: [PATCH] feat update --- src/sled/futures/internal/failure_handling.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 {