diff --git a/src/c_api/c_api_function.cc b/src/c_api/c_api_function.cc index 4744f829a838..49dd55fb0392 100644 --- a/src/c_api/c_api_function.cc +++ b/src/c_api/c_api_function.cc @@ -56,7 +56,7 @@ std::vector Gradient( std::vector ret; for (uint32_t i = 0; i < g->num_outputs(); ++i) { - ret.emplace_back(std::move(g), i, 0); + ret.emplace_back(g, i, 0); } return ret;