This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Description
As a library user, i would like to compile my code using the C++20 standard.
But in /3rd_party/include/opentracing/variant/variant.hpp' the std::result_of<>` template is used:
This template was removed in C++20: see https://en.cppreference.com/w/cpp/types/result_of
std::invoke_result<> can be used as an drop in replacement.
To make the code still compile in C++ versions below C++17 the code can use
__cpp_lib_is_invocable (https://en.cppreference.com/w/cpp/feature_test) to different
e. g.
template <typename F, typename V, typename Enable = void>
struct result_of_unary_visit
{
#ifdef __cpp_lib_is_invocable
using type = typename std::invoke_result<F, V&>::type;
#else
using type = typename std::result_of<F(V&)>::type;
#endif
};
template <typename F, typename V, typename Enable = void>
struct result_of_binary_visit
{
#ifdef __cpp_lib_is_invocable
using type = typename std::invoke_result<F, V&, V&>::type;
#else
using type = typename std::result_of<F(V&, V&)>::type;
#endif
};