From 579d709e7038fb497acfbf307280b59c401a5df5 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 14 Feb 2023 14:04:25 +0800 Subject: [PATCH 1/2] fix: version --- include/clipp.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/clipp.h b/include/clipp.h index d7b101e..fc9617d 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -46,6 +46,11 @@ #include #include +#ifdef _MSVC_LANG +#define CLIPP_CPLUSPLUS _MSVC_LANG +#else +#define CLIPP_CPLUSPLUS __cplusplus +#endif /*************************************************************************//** * @@ -160,7 +165,14 @@ constexpr auto check_is_callable(int) -> decltype( std::declval()(std::declval()...), std::integral_constant::type>::value>{} ); + std::is_same= 201703L + typename std::invoke_result::type +#else + typename std::result_of::type +#endif + >::value>{} ); + template constexpr auto @@ -171,7 +183,13 @@ constexpr auto check_is_callable_without_arg(int) -> decltype( std::declval()(), std::integral_constant::type>::value>{} ); + std::is_same= 201703L + typename std::invoke_result::type +#else + typename std::result_of::type +#endif + >::value>{} ); template constexpr auto From 28ccac926c9f2d52763f33db12e3d263550a4d7a Mon Sep 17 00:00:00 2001 From: David Date: Wed, 13 Sep 2023 18:04:03 +0800 Subject: [PATCH 2/2] fix: invoke_result_t --- include/clipp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clipp.h b/include/clipp.h index fc9617d..05c69d4 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -167,7 +167,7 @@ check_is_callable(int) -> decltype( std::integral_constant= 201703L - typename std::invoke_result::type + typename std::invoke_result_t #else typename std::result_of::type #endif @@ -185,7 +185,7 @@ check_is_callable_without_arg(int) -> decltype( std::integral_constant= 201703L - typename std::invoke_result::type + typename std::invoke_result_t #else typename std::result_of::type #endif