opencv / ade

Apache License 2.0
59 stars 49 forks source link

std::result_of is deprecated (C++17) and removed (C++20) #22

Closed RazielXYZ closed 1 year ago

RazielXYZ commented 2 years ago

Within type_traits.hpp there is one use of std::result_of, to create the type result_of_t which is then only used in func_ref.hpp. Unfortunately, result_of_t is deprecated/removed in newer C++ standards. I would suggest using std::invoke_result, which, in the context of func_ref.hpp, can be used as using actual_result_type = std::invoke_result<Callable, Args...>::type;