gemini-code-assist[bot] commented on code in PR #361:
URL: https://github.com/apache/tvm-ffi/pull/361#discussion_r2642233853
##########
include/tvm/ffi/reflection/overload.h:
##########
@@ -164,6 +164,7 @@ struct TypedOverload : OverloadBase {
template <std::size_t... I>
Ret CallAux(std::index_sequence<I...>, CaptureTuple& tuple) {
/// NOTE: this works for T, const T, const T&, T&& argument types
+ // NOLINTNEXTLINE(bugprone-unchecked-optional-access)
return f_(static_cast<std::tuple_element_t<I,
PackedArgs>>(std::move(*std::get<I>(tuple)))...);
Review Comment:

The argument forwarding logic can be simplified and made more idiomatic by
using `std::forward`. It achieves the same goal of correctly forwarding the
value category of the arguments to the wrapped function `f_` but is more
concise and recognizable as a forwarding pattern.
```c
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
return f_(std::forward<std::tuple_element_t<I,
PackedArgs>>(*std::get<I>(tuple))...);
```
--
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]