diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch | |
Diffstat (limited to 'vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch')
| -rw-r--r-- | vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch b/vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch new file mode 100644 index 0000000..6613d21 --- /dev/null +++ b/vcpkg/ports/clipp/Fix-result_of-deprecated-in-C++20.patch @@ -0,0 +1,47 @@ +diff --git a/include/clipp.h b/include/clipp.h +index d7b101e..a1bec2d 100644 +--- a/include/clipp.h ++++ b/include/clipp.h +@@ -155,16 +155,27 @@ namespace traits { + * @brief function (class) signature type trait + * + *****************************************************************************/ ++#if defined(__cpp_lib_is_invocable) + template<class Fn, class Ret, class... Args> + constexpr auto + check_is_callable(int) -> decltype( + std::declval<Fn>()(std::declval<Args>()...), + std::integral_constant<bool, +- std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} ); ++ std::is_same<Ret,typename std::invoke_result<Fn,Args...>::type>::value>{} ); + +-template<class,class,class...> ++template<class Fn, class Ret> + constexpr auto +-check_is_callable(long) -> std::false_type; ++check_is_callable_without_arg(int) -> decltype( ++ std::declval<Fn>()(), ++ std::integral_constant<bool, ++ std::is_same<Ret,typename std::invoke_result<Fn>::type>::value>{} ); ++#else ++template<class Fn, class Ret, class... Args> ++constexpr auto ++check_is_callable(int) -> decltype( ++ std::declval<Fn>()(std::declval<Args>()...), ++ std::integral_constant<bool, ++ std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} ); + + template<class Fn, class Ret> + constexpr auto +@@ -172,6 +183,11 @@ check_is_callable_without_arg(int) -> decltype( + std::declval<Fn>()(), + std::integral_constant<bool, + std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} ); ++#endif ++ ++template<class,class,class...> ++constexpr auto ++check_is_callable(long) -> std::false_type; + + template<class,class> + constexpr auto |