From bd641fb00551e3897d31452fb1191af0f0cb837c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20K=2E=20Schau?= Date: Tue, 25 Jan 2022 12:01:53 +0100 Subject: [PATCH] Replace std::result_of with std::invoke_result for C++17 compiles --- 3rd_party/include/opentracing/variant/variant.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/3rd_party/include/opentracing/variant/variant.hpp b/3rd_party/include/opentracing/variant/variant.hpp index 7b6bb47..eb2c619 100644 --- a/3rd_party/include/opentracing/variant/variant.hpp +++ b/3rd_party/include/opentracing/variant/variant.hpp @@ -167,7 +167,11 @@ struct enable_if_type template struct result_of_unary_visit { - using type = typename std::result_of::type; +#ifdef __cpp_lib_is_invocable + using type = typename std::invoke_result::type; +#else + using type = typename std::result_of::type; +#endif }; template @@ -179,7 +183,11 @@ struct result_of_unary_visit struct result_of_binary_visit { - using type = typename std::result_of::type; +#ifdef __cpp_lib_is_invocable + using type = typename std::invoke_result::type; +#else + using type = typename std::result_of::type; +#endif }; template