mirror of
https://github.com/danog/patches.git
synced 2024-11-26 11:54:51 +01:00
Fix build clients with C++20.
This commit is contained in:
parent
517b703e55
commit
a9ec68b6bc
@ -12,6 +12,30 @@ index a62632e2c3f..ea2a9325a9c 100644
|
||||
}
|
||||
|
||||
config("libjpeg_turbo_config") {
|
||||
diff --git a/abseil-cpp/absl/meta/type_traits.h b/abseil-cpp/absl/meta/type_traits.h
|
||||
index ba87d2f0edf..fb9ffb721e8 100644
|
||||
--- a/abseil-cpp/absl/meta/type_traits.h
|
||||
+++ b/abseil-cpp/absl/meta/type_traits.h
|
||||
@@ -616,8 +616,19 @@ using common_type_t = typename std::common_type<T...>::type;
|
||||
template <typename T>
|
||||
using underlying_type_t = typename std::underlying_type<T>::type;
|
||||
|
||||
+#if _MSVC_LANG > 201703L
|
||||
+template <typename T>
|
||||
+struct result_of_helper;
|
||||
+template <typename F, typename ...Args>
|
||||
+struct result_of_helper<F(Args...)> {
|
||||
+ using type = std::invoke_result_t<F, Args...>;
|
||||
+};
|
||||
+template <typename T>
|
||||
+using result_of_t = typename result_of_helper<T>::type;
|
||||
+#else // C++20
|
||||
template <typename T>
|
||||
using result_of_t = typename std::result_of<T>::type;
|
||||
+#endif // C++20
|
||||
|
||||
namespace type_traits_internal {
|
||||
// In MSVC we can't probe std::hash or stdext::hash because it triggers a
|
||||
diff --git a/libjpeg.gni b/libjpeg.gni
|
||||
index 049348b79bd..039385c9739 100644
|
||||
--- a/libjpeg.gni
|
||||
|
Loading…
Reference in New Issue
Block a user