std::result_of_t is deprecated in C++17, and removed in C++20:
https://en.cppreference.com/w/cpp/types/result_of