DarkSharpness commented on code in PR #266:
URL: https://github.com/apache/tvm-ffi/pull/266#discussion_r2534148949
##########
include/tvm/ffi/function.h:
##########
@@ -503,9 +513,9 @@ class Function : public ObjectRef {
* \param name optional name attacked to the function.
*/
template <typename TCallable>
- static Function FromTyped(TCallable callable, std::string name) {
- using FuncInfo = details::FunctionInfo<TCallable>;
- auto call_packed = [callable = std::move(callable), name =
std::move(name)](
+ static Function FromTyped(TCallable&& callable, std::string name) {
+ using FuncInfo = details::FunctionInfo<std::decay_t<TCallable>>;
+ auto call_packed = [callable = std::forward<TCallable>(callable), name =
std::move(name)](
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]