std::result_of is deprecated in C++17, and removed in C++20. Microsoft has gone ahead with the removal as of Visual Studio 16.6.0, so before this change our code is broken there.