gemini-code-assist[bot] commented on code in PR #186:
URL: https://github.com/apache/tvm-ffi/pull/186#discussion_r2449332553
##########
include/tvm/ffi/function_details.h:
##########
@@ -113,6 +113,8 @@ template <typename R, typename... Args>
struct FunctionInfo<R(Args...), void> : FuncFunctorImpl<R, Args...> {};
template <typename R, typename... Args>
struct FunctionInfo<R (*)(Args...), void> : FuncFunctorImpl<R, Args...> {};
+template <typename R, typename... Args>
+struct FunctionInfo<R (&)(Args...), void> : FuncFunctorImpl<R, Args...> {};
Review Comment:

This specialization correctly handles function references. However, similar
to the existing specializations for function types and function pointers, it
doesn't handle `noexcept` functions. This will lead to a compilation error if
someone tries to export a `noexcept` function.
To make this more robust, you could also add support for `noexcept` function
references. For consistency, this should probably be done for function types
and function pointers as well, perhaps in a follow-up change.
For example:
```cpp
template <typename R, typename... Args>
struct FunctionInfo<R (&)(Args...) noexcept, void> : FuncFunctorImpl<R,
Args...> {};
```
--
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]