tqchen commented on code in PR #229:
URL: https://github.com/apache/tvm-ffi/pull/229#discussion_r2506948326


##########
include/tvm/ffi/function_details.h:
##########
@@ -134,11 +141,11 @@ struct FunctionInfo<R (Class::*)(Args...) const,
 /*! \brief Using static function to output typed function signature */
 using FGetFuncSignature = std::string (*)();
 
-/*!
- * \brief Auxilary argument value with context for error reporting
- */
+template <typename Type, bool = TypeSupported<Type>>

Review Comment:
   I am mainly hesitant about this extra template generic here, if we restrict 
to `const T&, T, T&&` is this still necessary, or is it sufficient if we update 
ArgSupported to indicate arg is supported



##########
include/tvm/ffi/function_details.h:
##########
@@ -64,6 +64,13 @@ template <typename T>
 static constexpr bool RetSupported =
     (std::is_same_v<T, Any> || std::is_void_v<T> || 
TypeTraits<T>::convert_enabled);
 
+/// NOTE: we only support `T`, `const T`, `const T&` and `T &&` as argument 
types
+template <typename T>
+static constexpr bool TypeSupported =

Review Comment:
   can we fold into ArgSupported in this case?



-- 
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]

Reply via email to