が、std::result_ofを使用しての正しい方法であると書かれている: template<class F, class... Args>
std::result_of_t<F&&(Args&&...)>
// instead of std::result_of_t<F(Args...)>, which is wrong
my_invoke(F&& f, Args&&... ar
C++ 17では、instantiate objects without specifying the template typesに可能です。基本的には、このコードはコンパイルします: std::pair p(2, 4.5); // deduces to std::pair<int, double> p(2, 4.5);
std::tuple t(4, 3, 2.5); // same as