Template Struct init< >#

Inheritance Relationships#

Base Type#

Struct Documentation#

template<>
struct init<> : public tvm::ffi::reflection::InfoTrait#

Specialization of init for zero template arguments.

This specialization doubles as an InfoTrait that controls whether a field participates in the auto-generated __ffi_init__.

  • init(false) as a field trait: excludes the field from the auto-generated init.

  • init(false) as an ObjectDef constructor argument: suppresses auto-init entirely.

  • init<>() passed to ObjectDef::def(): registers a zero-argument constructor.

Public Functions

constexpr init() noexcept = default#

Default constructor (for zero-argument constructor registration).

inline explicit init(bool include)#

Constructor for field/class-level init control.

Parameters:

include – Whether the field should be included in the auto-generated init.

inline void Apply(TVMFFIFieldInfo *info) const#

Apply the init flag to the field info.

Parameters:

info – The field info.

Friends

friend class ObjectDef
friend class OverloadObjectDef