gemini-code-assist[bot] commented on code in PR #399:
URL: https://github.com/apache/tvm-ffi/pull/399#discussion_r2679756709


##########
include/tvm/ffi/expected.h:
##########
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/ffi/expected.h
+ * \brief Runtime Expected container type for exception-free error handling.
+ */
+#ifndef TVM_FFI_EXPECTED_H_
+#define TVM_FFI_EXPECTED_H_
+
+#include <tvm/ffi/any.h>
+#include <tvm/ffi/error.h>
+
+#include <type_traits>
+#include <utility>
+
+namespace tvm {
+namespace ffi {
+
+/*!
+ * \brief Expected<T> provides exception-free error handling for FFI functions.
+ *
+ * Expected<T> is similar to Rust's Result<T, Error> or C++23's std::expected.
+ * It can hold either a success value of type T or an error of type Error.
+ *
+ * \tparam T The success type. Must be Any-compatible and cannot be Error.
+ *
+ * Usage:
+ * \code
+ * Expected<int> divide(int a, int b) {
+ *   if (b == 0) {
+ *     return ExpectedErr(Error("ValueError", "Division by zero"));
+ *   }
+ *   return ExpectedOk(a / b);
+ * }
+ *
+ * Expected<int> result = divide(10, 2);
+ * if (result.is_ok()) {
+ *   int value = result.value();
+ * } else {
+ *   Error err = result.error();
+ * }
+ * \endcode
+ */
+template <typename T>
+class Expected {
+ public:
+  static_assert(!std::is_same_v<T, Error>, "Expected<Error> is not allowed. 
Use Error directly.");
+
+  /*!
+   * \brief Create an Expected with a success value.
+   * \param value The success value.
+   * \return Expected containing the success value.
+   */
+  static Expected Ok(T value) { return Expected(Any(std::move(value))); }
+
+  /*!
+   * \brief Create an Expected with an error.
+   * \param error The error value.
+   * \return Expected containing the error.
+   */
+  static Expected Err(Error error) { return Expected(Any(std::move(error))); }
+
+  /*!
+   * \brief Check if the Expected contains a success value.
+   * \return True if contains success value, false if contains error.
+   */
+  TVM_FFI_INLINE bool is_ok() const { return data_.as<T>().has_value(); }
+
+  /*!
+   * \brief Check if the Expected contains an error.
+   * \return True if contains error, false if contains success value.
+   */
+  TVM_FFI_INLINE bool is_err() const { return data_.as<Error>().has_value(); }
+
+  /*!
+   * \brief Alias for is_ok().
+   * \return True if contains success value.
+   */
+  TVM_FFI_INLINE bool has_value() const { return is_ok(); }
+
+  /*!
+   * \brief Access the success value.
+   * \return The success value.
+   * \throws RuntimeError if the Expected contains an error.
+   */
+  TVM_FFI_INLINE T value() const {
+    if (is_err()) {
+      TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
+    }
+    return data_.cast<T>();
+  }

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The `value()` method is `const`-qualified, which means it always returns a 
copy of the contained value. This can be inefficient when the `Expected` object 
is an rvalue (e.g., a temporary returned from a function). Consider adding an 
rvalue-qualified overload to allow moving the value out. This would improve 
performance in scenarios like `std::move(expected).value()`.
   
   You can change the existing method to be `const&`-qualified and add a 
`&&`-qualified overload:
   ```cpp
   TVM_FFI_INLINE T value() const& {
     if (is_err()) {
       TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
     }
     return data_.cast<T>();
   }
   
   TVM_FFI_INLINE T value() && {
     if (is_err()) {
       TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
     }
     return std::move(data_).cast<T>();
   }
   ```



##########
include/tvm/ffi/expected.h:
##########
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/ffi/expected.h
+ * \brief Runtime Expected container type for exception-free error handling.
+ */
+#ifndef TVM_FFI_EXPECTED_H_
+#define TVM_FFI_EXPECTED_H_
+
+#include <tvm/ffi/any.h>
+#include <tvm/ffi/error.h>
+
+#include <type_traits>
+#include <utility>
+
+namespace tvm {
+namespace ffi {
+
+/*!
+ * \brief Expected<T> provides exception-free error handling for FFI functions.
+ *
+ * Expected<T> is similar to Rust's Result<T, Error> or C++23's std::expected.
+ * It can hold either a success value of type T or an error of type Error.
+ *
+ * \tparam T The success type. Must be Any-compatible and cannot be Error.
+ *
+ * Usage:
+ * \code
+ * Expected<int> divide(int a, int b) {
+ *   if (b == 0) {
+ *     return ExpectedErr(Error("ValueError", "Division by zero"));
+ *   }
+ *   return ExpectedOk(a / b);
+ * }
+ *
+ * Expected<int> result = divide(10, 2);
+ * if (result.is_ok()) {
+ *   int value = result.value();
+ * } else {
+ *   Error err = result.error();
+ * }
+ * \endcode
+ */
+template <typename T>
+class Expected {
+ public:
+  static_assert(!std::is_same_v<T, Error>, "Expected<Error> is not allowed. 
Use Error directly.");
+
+  /*!
+   * \brief Create an Expected with a success value.
+   * \param value The success value.
+   * \return Expected containing the success value.
+   */
+  static Expected Ok(T value) { return Expected(Any(std::move(value))); }
+
+  /*!
+   * \brief Create an Expected with an error.
+   * \param error The error value.
+   * \return Expected containing the error.
+   */
+  static Expected Err(Error error) { return Expected(Any(std::move(error))); }
+
+  /*!
+   * \brief Check if the Expected contains a success value.
+   * \return True if contains success value, false if contains error.
+   */
+  TVM_FFI_INLINE bool is_ok() const { return data_.as<T>().has_value(); }
+
+  /*!
+   * \brief Check if the Expected contains an error.
+   * \return True if contains error, false if contains success value.
+   */
+  TVM_FFI_INLINE bool is_err() const { return data_.as<Error>().has_value(); }
+
+  /*!
+   * \brief Alias for is_ok().
+   * \return True if contains success value.
+   */
+  TVM_FFI_INLINE bool has_value() const { return is_ok(); }
+
+  /*!
+   * \brief Access the success value.
+   * \return The success value.
+   * \throws RuntimeError if the Expected contains an error.
+   */
+  TVM_FFI_INLINE T value() const {
+    if (is_err()) {
+      TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
+    }
+    return data_.cast<T>();
+  }
+
+  /*!
+   * \brief Access the error value.
+   * \return The error value.
+   * \note Behavior is undefined if the Expected contains a success value.
+   *       Always check is_err() before calling this method.
+   */
+  TVM_FFI_INLINE Error error() const {
+    TVM_FFI_ICHECK(is_err()) << "Expected does not contain an error";
+    return data_.cast<Error>();
+  }

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Similar to `value()`, the `error()` method is `const`-qualified and always 
returns a copy. You can add an rvalue-qualified overload to allow moving the 
`Error` object out, which is more efficient.
   ```cpp
   TVM_FFI_INLINE Error error() const& {
     TVM_FFI_ICHECK(is_err()) << "Expected does not contain an error";
     return data_.cast<Error>();
   }
   
   TVM_FFI_INLINE Error error() && {
     TVM_FFI_ICHECK(is_err()) << "Expected does not contain an error";
     return std::move(data_).cast<Error>();
   }
   ```



##########
include/tvm/ffi/expected.h:
##########
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/ffi/expected.h
+ * \brief Runtime Expected container type for exception-free error handling.
+ */
+#ifndef TVM_FFI_EXPECTED_H_
+#define TVM_FFI_EXPECTED_H_
+
+#include <tvm/ffi/any.h>
+#include <tvm/ffi/error.h>
+
+#include <type_traits>
+#include <utility>
+
+namespace tvm {
+namespace ffi {
+
+/*!
+ * \brief Expected<T> provides exception-free error handling for FFI functions.
+ *
+ * Expected<T> is similar to Rust's Result<T, Error> or C++23's std::expected.
+ * It can hold either a success value of type T or an error of type Error.
+ *
+ * \tparam T The success type. Must be Any-compatible and cannot be Error.
+ *
+ * Usage:
+ * \code
+ * Expected<int> divide(int a, int b) {
+ *   if (b == 0) {
+ *     return ExpectedErr(Error("ValueError", "Division by zero"));
+ *   }
+ *   return ExpectedOk(a / b);
+ * }
+ *
+ * Expected<int> result = divide(10, 2);
+ * if (result.is_ok()) {
+ *   int value = result.value();
+ * } else {
+ *   Error err = result.error();
+ * }
+ * \endcode
+ */
+template <typename T>
+class Expected {
+ public:
+  static_assert(!std::is_same_v<T, Error>, "Expected<Error> is not allowed. 
Use Error directly.");
+
+  /*!
+   * \brief Create an Expected with a success value.
+   * \param value The success value.
+   * \return Expected containing the success value.
+   */
+  static Expected Ok(T value) { return Expected(Any(std::move(value))); }
+
+  /*!
+   * \brief Create an Expected with an error.
+   * \param error The error value.
+   * \return Expected containing the error.
+   */
+  static Expected Err(Error error) { return Expected(Any(std::move(error))); }
+
+  /*!
+   * \brief Check if the Expected contains a success value.
+   * \return True if contains success value, false if contains error.
+   */
+  TVM_FFI_INLINE bool is_ok() const { return data_.as<T>().has_value(); }
+
+  /*!
+   * \brief Check if the Expected contains an error.
+   * \return True if contains error, false if contains success value.
+   */
+  TVM_FFI_INLINE bool is_err() const { return data_.as<Error>().has_value(); }
+
+  /*!
+   * \brief Alias for is_ok().
+   * \return True if contains success value.
+   */
+  TVM_FFI_INLINE bool has_value() const { return is_ok(); }
+
+  /*!
+   * \brief Access the success value.
+   * \return The success value.
+   * \throws RuntimeError if the Expected contains an error.
+   */
+  TVM_FFI_INLINE T value() const {
+    if (is_err()) {
+      TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
+    }
+    return data_.cast<T>();
+  }
+
+  /*!
+   * \brief Access the error value.
+   * \return The error value.
+   * \note Behavior is undefined if the Expected contains a success value.
+   *       Always check is_err() before calling this method.
+   */
+  TVM_FFI_INLINE Error error() const {
+    TVM_FFI_ICHECK(is_err()) << "Expected does not contain an error";
+    return data_.cast<Error>();
+  }
+
+  /*!
+   * \brief Get the success value or a default value.
+   * \param default_value The value to return if Expected contains an error.
+   * \return The success value if present, otherwise the default value.
+   */
+  template <typename U = std::remove_cv_t<T>>
+  TVM_FFI_INLINE T value_or(U&& default_value) const {
+    if (is_ok()) {
+      return *data_.as<T>();
+    }
+    return T(std::forward<U>(default_value));
+  }
+
+ private:
+  friend struct TypeTraits<Expected<T>>;
+
+  /*!
+   * \brief Private constructor from Any.
+   * \param data The data containing either T or Error.
+   * \note This constructor is used by TypeTraits for conversion.
+   */
+  explicit Expected(Any data) : data_(std::move(data)) {
+    TVM_FFI_ICHECK(data_.as<T>().has_value() || data_.as<Error>().has_value())
+        << "Expected must contain either T or Error";
+  }
+
+  Any data_;  // Holds either T or Error
+};
+
+/*!
+ * \brief Helper function to create Expected::Ok with type deduction.
+ * \tparam T The success type (deduced from argument).
+ * \param value The success value.
+ * \return Expected<T> containing the success value.
+ */
+template <typename T>
+TVM_FFI_INLINE Expected<T> ExpectedOk(T value) {
+  return Expected<T>::Ok(std::move(value));
+}
+
+/*!
+ * \brief Helper function to create Expected::Err.
+ * \param error The error value.
+ * \return Expected<Any> containing the error.
+ * \note Returns Expected<Any> to allow usage in contexts where T is inferred.
+ */
+template <typename T = Any>
+TVM_FFI_INLINE Expected<T> ExpectedErr(Error error) {
+  return Expected<T>::Err(std::move(error));
+}
+
+// TypeTraits specialization for Expected<T>
+template <typename T>
+inline constexpr bool use_default_type_traits_v<Expected<T>> = false;
+
+template <typename T>
+struct TypeTraits<Expected<T>> : public TypeTraitsBase {
+  TVM_FFI_INLINE static void CopyToAnyView(const Expected<T>& src, TVMFFIAny* 
result) {
+    // Extract value from src.data_ and copy it properly
+    const TVMFFIAny* src_any = reinterpret_cast<const TVMFFIAny*>(&src.data_);
+
+    if (TypeTraits<T>::CheckAnyStrict(src_any)) {
+      // It contains T, copy it out and move to result
+      T value = TypeTraits<T>::CopyFromAnyViewAfterCheck(src_any);
+      TypeTraits<T>::MoveToAny(std::move(value), result);
+    } else {
+      // It contains Error, copy it out and move to result
+      Error err = TypeTraits<Error>::CopyFromAnyViewAfterCheck(src_any);
+      TypeTraits<Error>::MoveToAny(std::move(err), result);
+    }
+  }
+
+  TVM_FFI_INLINE static void MoveToAny(Expected<T> src, TVMFFIAny* result) {
+    // Extract value from src.data_ and move it properly
+    TVMFFIAny* src_any = reinterpret_cast<TVMFFIAny*>(&src.data_);
+
+    if (TypeTraits<T>::CheckAnyStrict(src_any)) {
+      // It contains T, move it out and move to result
+      T value = TypeTraits<T>::MoveFromAnyAfterCheck(src_any);
+      TypeTraits<T>::MoveToAny(std::move(value), result);
+    } else {
+      // It contains Error, move it out and move to result
+      Error err = TypeTraits<Error>::MoveFromAnyAfterCheck(src_any);
+      TypeTraits<Error>::MoveToAny(std::move(err), result);
+    }
+  }

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Similar to `CopyToAnyView`, the `MoveToAny` implementation can be greatly 
simplified. Since `src` is passed by value (effectively a move), you can move 
the underlying `Any` object directly. This is more readable and directly 
expresses the intent of moving the contained value.
   
   ```c
     TVM_FFI_INLINE static void MoveToAny(Expected<T> src, TVMFFIAny* result) {
       // An Expected<T> is represented by its underlying value (T or Error)
       // at the FFI boundary. We can simply move the contained Any.
       *result = details::AnyUnsafe::MoveAnyToTVMFFIAny(std::move(src.data_));
     }
   ```



##########
include/tvm/ffi/expected.h:
##########
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file tvm/ffi/expected.h
+ * \brief Runtime Expected container type for exception-free error handling.
+ */
+#ifndef TVM_FFI_EXPECTED_H_
+#define TVM_FFI_EXPECTED_H_
+
+#include <tvm/ffi/any.h>
+#include <tvm/ffi/error.h>
+
+#include <type_traits>
+#include <utility>
+
+namespace tvm {
+namespace ffi {
+
+/*!
+ * \brief Expected<T> provides exception-free error handling for FFI functions.
+ *
+ * Expected<T> is similar to Rust's Result<T, Error> or C++23's std::expected.
+ * It can hold either a success value of type T or an error of type Error.
+ *
+ * \tparam T The success type. Must be Any-compatible and cannot be Error.
+ *
+ * Usage:
+ * \code
+ * Expected<int> divide(int a, int b) {
+ *   if (b == 0) {
+ *     return ExpectedErr(Error("ValueError", "Division by zero"));
+ *   }
+ *   return ExpectedOk(a / b);
+ * }
+ *
+ * Expected<int> result = divide(10, 2);
+ * if (result.is_ok()) {
+ *   int value = result.value();
+ * } else {
+ *   Error err = result.error();
+ * }
+ * \endcode
+ */
+template <typename T>
+class Expected {
+ public:
+  static_assert(!std::is_same_v<T, Error>, "Expected<Error> is not allowed. 
Use Error directly.");
+
+  /*!
+   * \brief Create an Expected with a success value.
+   * \param value The success value.
+   * \return Expected containing the success value.
+   */
+  static Expected Ok(T value) { return Expected(Any(std::move(value))); }
+
+  /*!
+   * \brief Create an Expected with an error.
+   * \param error The error value.
+   * \return Expected containing the error.
+   */
+  static Expected Err(Error error) { return Expected(Any(std::move(error))); }
+
+  /*!
+   * \brief Check if the Expected contains a success value.
+   * \return True if contains success value, false if contains error.
+   */
+  TVM_FFI_INLINE bool is_ok() const { return data_.as<T>().has_value(); }
+
+  /*!
+   * \brief Check if the Expected contains an error.
+   * \return True if contains error, false if contains success value.
+   */
+  TVM_FFI_INLINE bool is_err() const { return data_.as<Error>().has_value(); }
+
+  /*!
+   * \brief Alias for is_ok().
+   * \return True if contains success value.
+   */
+  TVM_FFI_INLINE bool has_value() const { return is_ok(); }
+
+  /*!
+   * \brief Access the success value.
+   * \return The success value.
+   * \throws RuntimeError if the Expected contains an error.
+   */
+  TVM_FFI_INLINE T value() const {
+    if (is_err()) {
+      TVM_FFI_THROW(RuntimeError) << "Bad expected access: contains error";
+    }
+    return data_.cast<T>();
+  }
+
+  /*!
+   * \brief Access the error value.
+   * \return The error value.
+   * \note Behavior is undefined if the Expected contains a success value.
+   *       Always check is_err() before calling this method.
+   */
+  TVM_FFI_INLINE Error error() const {
+    TVM_FFI_ICHECK(is_err()) << "Expected does not contain an error";
+    return data_.cast<Error>();
+  }
+
+  /*!
+   * \brief Get the success value or a default value.
+   * \param default_value The value to return if Expected contains an error.
+   * \return The success value if present, otherwise the default value.
+   */
+  template <typename U = std::remove_cv_t<T>>
+  TVM_FFI_INLINE T value_or(U&& default_value) const {
+    if (is_ok()) {
+      return *data_.as<T>();
+    }
+    return T(std::forward<U>(default_value));
+  }
+
+ private:
+  friend struct TypeTraits<Expected<T>>;
+
+  /*!
+   * \brief Private constructor from Any.
+   * \param data The data containing either T or Error.
+   * \note This constructor is used by TypeTraits for conversion.
+   */
+  explicit Expected(Any data) : data_(std::move(data)) {
+    TVM_FFI_ICHECK(data_.as<T>().has_value() || data_.as<Error>().has_value())
+        << "Expected must contain either T or Error";
+  }
+
+  Any data_;  // Holds either T or Error
+};
+
+/*!
+ * \brief Helper function to create Expected::Ok with type deduction.
+ * \tparam T The success type (deduced from argument).
+ * \param value The success value.
+ * \return Expected<T> containing the success value.
+ */
+template <typename T>
+TVM_FFI_INLINE Expected<T> ExpectedOk(T value) {
+  return Expected<T>::Ok(std::move(value));
+}
+
+/*!
+ * \brief Helper function to create Expected::Err.
+ * \param error The error value.
+ * \return Expected<Any> containing the error.
+ * \note Returns Expected<Any> to allow usage in contexts where T is inferred.
+ */
+template <typename T = Any>
+TVM_FFI_INLINE Expected<T> ExpectedErr(Error error) {
+  return Expected<T>::Err(std::move(error));
+}
+
+// TypeTraits specialization for Expected<T>
+template <typename T>
+inline constexpr bool use_default_type_traits_v<Expected<T>> = false;
+
+template <typename T>
+struct TypeTraits<Expected<T>> : public TypeTraitsBase {
+  TVM_FFI_INLINE static void CopyToAnyView(const Expected<T>& src, TVMFFIAny* 
result) {
+    // Extract value from src.data_ and copy it properly
+    const TVMFFIAny* src_any = reinterpret_cast<const TVMFFIAny*>(&src.data_);
+
+    if (TypeTraits<T>::CheckAnyStrict(src_any)) {
+      // It contains T, copy it out and move to result
+      T value = TypeTraits<T>::CopyFromAnyViewAfterCheck(src_any);
+      TypeTraits<T>::MoveToAny(std::move(value), result);
+    } else {
+      // It contains Error, copy it out and move to result
+      Error err = TypeTraits<Error>::CopyFromAnyViewAfterCheck(src_any);
+      TypeTraits<Error>::MoveToAny(std::move(err), result);
+    }
+  }

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The implementation of `CopyToAnyView` is correct but can be simplified. 
Instead of checking the type and manually performing a copy-then-move for each 
case, you can leverage the `Any` type's copy constructor to handle the logic. 
This makes the code more concise and less error-prone, as it relies on the 
already-tested `Any` copy semantics.
   
   ```c
     TVM_FFI_INLINE static void CopyToAnyView(const Expected<T>& src, 
TVMFFIAny* result) {
       // An Expected<T> is represented by its underlying value (T or Error)
       // at the FFI boundary. We can simply copy the contained Any.
       Any copied_any = src.data_;
       *result = details::AnyUnsafe::MoveAnyToTVMFFIAny(std::move(copied_any));
     }
   ```



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