@@ -175,7 +175,7 @@ template <typename... Types>
175
175
struct TypeTraits <Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types...>> {
176
176
using ObjectRefTypeTraitsBase<Tuple<Types...>>::CopyFromAnyViewAfterCheck;
177
177
178
- static TVM_FFI_INLINE std::string GetMismatchTypeInfo (const TVMFFIAny* src) {
178
+ TVM_FFI_INLINE static std::string GetMismatchTypeInfo (const TVMFFIAny* src) {
179
179
if (src->type_index != TypeIndex::kTVMFFIArray ) {
180
180
return TypeTraitsBase::GetMismatchTypeInfo (src);
181
181
}
@@ -187,7 +187,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
187
187
}
188
188
189
189
template <size_t I, typename T, typename ... Rest>
190
- static TVM_FFI_INLINE std::string GetMismatchTypeInfoHelper (const Any* arr) {
190
+ TVM_FFI_INLINE static std::string GetMismatchTypeInfoHelper (const Any* arr) {
191
191
if constexpr (!std::is_same_v<T, Any>) {
192
192
const Any& any_v = arr[I];
193
193
if (!details::AnyUnsafe::CheckAnyStrict<T>(any_v) && !(any_v.try_cast <T>().has_value ())) {
@@ -203,7 +203,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
203
203
TVM_FFI_UNREACHABLE ();
204
204
}
205
205
206
- static TVM_FFI_INLINE bool CheckAnyStrict (const TVMFFIAny* src) {
206
+ TVM_FFI_INLINE static bool CheckAnyStrict (const TVMFFIAny* src) {
207
207
if (src->type_index != TypeIndex::kTVMFFIArray ) return false ;
208
208
const ArrayObj* n = reinterpret_cast <const ArrayObj*>(src->v_obj );
209
209
if (n->size () != sizeof ...(Types)) return false ;
@@ -212,7 +212,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
212
212
}
213
213
214
214
template <size_t I, typename T, typename ... Rest>
215
- static TVM_FFI_INLINE bool CheckAnyStrictHelper (const TVMFFIAny* src_arr) {
215
+ TVM_FFI_INLINE static bool CheckAnyStrictHelper (const TVMFFIAny* src_arr) {
216
216
if constexpr (!std::is_same_v<T, Any>) {
217
217
if (!TypeTraits<T>::CheckAnyStrict (src_arr + I)) {
218
218
return false ;
@@ -224,7 +224,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
224
224
return true ;
225
225
}
226
226
227
- static TVM_FFI_INLINE std::optional<Tuple<Types...>> TryCastFromAnyView (const TVMFFIAny* src //
227
+ TVM_FFI_INLINE static std::optional<Tuple<Types...>> TryCastFromAnyView (const TVMFFIAny* src //
228
228
) {
229
229
if (src->type_index != TypeIndex::kTVMFFIArray ) return std::nullopt ;
230
230
const ArrayObj* n = reinterpret_cast <const ArrayObj*>(src->v_obj );
@@ -243,7 +243,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
243
243
}
244
244
245
245
template <size_t I, typename T, typename ... Rest>
246
- static TVM_FFI_INLINE bool TryConvertElements (Any* arr) {
246
+ TVM_FFI_INLINE static bool TryConvertElements (Any* arr) {
247
247
if constexpr (!std::is_same_v<T, Any>) {
248
248
if (auto opt_convert = arr[I].try_cast <T>()) {
249
249
arr[I] = *std::move (opt_convert);
@@ -258,7 +258,7 @@ struct TypeTraits<Tuple<Types...>> : public ObjectRefTypeTraitsBase<Tuple<Types.
258
258
}
259
259
}
260
260
261
- static TVM_FFI_INLINE std::string TypeStr () {
261
+ TVM_FFI_INLINE static std::string TypeStr () {
262
262
return details::ContainerTypeStr<Types...>(" Tuple" );
263
263
}
264
264
};
0 commit comments