infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches

The core data structures and APIs for describing C types and function signatures. More...

Collaboration diagram for Type System:

Classes

struct  infix_type_t
 A semi-opaque structure that describes a C type. More...
 
struct  infix_struct_member_t
 Describes a single member of a C struct or union. More...
 
struct  infix_function_argument_t
 Describes a single argument to a C function. More...
 

Typedefs

typedef struct infix_type_t infix_type
 A semi-opaque object describing a C type's memory layout and calling convention. See infix_type_t for details.
 
typedef struct infix_struct_member_t infix_struct_member
 A semi-opaque object describing a member of a C struct or union. See infix_struct_member_t for details.
 
typedef struct infix_function_argument_t infix_function_argument
 A semi-opaque object describing an argument to a C function. See infix_function_argument_t for details.
 
typedef struct infix_forward_t infix_forward_t
 An opaque handle to a forward (C-to-native) trampoline. Created by infix_forward_create and variants.
 
typedef struct infix_reverse_t infix_reverse_t
 An opaque handle to a reverse (native-to-C) trampoline, also known as a callback or closure.
 
typedef infix_reverse_t infix_context_t
 An alias for infix_reverse_t, used to clarify its role as a context object in closure handlers.
 
typedef struct infix_arena_t infix_arena_t
 An opaque handle to an arena allocator, used for efficient grouped memory allocations.
 
typedef struct infix_library_t infix_library_t
 An opaque handle to a dynamically loaded shared library (.so, .dll, .dylib).
 
typedef struct infix_registry_t infix_registry_t
 An opaque handle to a named type registry.
 

Enumerations

enum  infix_type_category {
  INFIX_TYPE_PRIMITIVE , INFIX_TYPE_POINTER , INFIX_TYPE_STRUCT , INFIX_TYPE_UNION ,
  INFIX_TYPE_ARRAY , INFIX_TYPE_REVERSE_TRAMPOLINE , INFIX_TYPE_ENUM , INFIX_TYPE_COMPLEX ,
  INFIX_TYPE_VECTOR , INFIX_TYPE_NAMED_REFERENCE , INFIX_TYPE_VOID
}
 Enumerates the fundamental categories of types that infix can represent. More...
 
enum  infix_primitive_type_id {
  INFIX_PRIMITIVE_BOOL , INFIX_PRIMITIVE_UINT8 , INFIX_PRIMITIVE_SINT8 , INFIX_PRIMITIVE_UINT16 ,
  INFIX_PRIMITIVE_SINT16 , INFIX_PRIMITIVE_UINT32 , INFIX_PRIMITIVE_SINT32 , INFIX_PRIMITIVE_UINT64 ,
  INFIX_PRIMITIVE_SINT64 , INFIX_PRIMITIVE_UINT128 , INFIX_PRIMITIVE_SINT128 , INFIX_PRIMITIVE_FLOAT ,
  INFIX_PRIMITIVE_DOUBLE , INFIX_PRIMITIVE_LONG_DOUBLE
}
 Enumerates the supported primitive C types. More...
 
enum  infix_aggregate_category_t { INFIX_AGGREGATE_STRUCT , INFIX_AGGREGATE_UNION }
 Specifies whether a named type reference refers to a struct or a union. More...
 

Functions

c23_nodiscard infix_typeinfix_type_create_primitive (infix_primitive_type_id)
 Creates a static descriptor for a primitive C type.
 
c23_nodiscard infix_typeinfix_type_create_pointer (void)
 Creates a static descriptor for a generic pointer (void*).
 
c23_nodiscard infix_status infix_type_create_pointer_to (infix_arena_t *, infix_type **, infix_type *)
 Creates a new pointer type that points to a specific type.
 
c23_nodiscard infix_typeinfix_type_create_void (void)
 Creates a static descriptor for the void type.
 
c23_nodiscard infix_status infix_type_create_struct (infix_arena_t *, infix_type **, infix_struct_member *, size_t)
 Creates a new struct type from an array of members, calculating layout automatically.
 
c23_nodiscard infix_status infix_type_create_packed_struct (infix_arena_t *, infix_type **, size_t, size_t, infix_struct_member *, size_t)
 Creates a new packed struct type with a user-specified layout.
 
c23_nodiscard infix_status infix_type_create_union (infix_arena_t *, infix_type **, infix_struct_member *, size_t)
 Creates a new union type from an array of members.
 
c23_nodiscard infix_status infix_type_create_array (infix_arena_t *, infix_type **, infix_type *, size_t)
 Creates a new fixed-size array type.
 
c23_nodiscard infix_status infix_type_create_enum (infix_arena_t *, infix_type **, infix_type *)
 Creates a new enum type with a specified underlying integer type.
 
c23_nodiscard infix_status infix_type_create_named_reference (infix_arena_t *, infix_type **, const char *, infix_aggregate_category_t)
 Creates a placeholder for a named type to be resolved by a registry.
 
c23_nodiscard infix_status infix_type_create_complex (infix_arena_t *, infix_type **, infix_type *)
 Creates a new _Complex number type.
 
c23_nodiscard infix_status infix_type_create_vector (infix_arena_t *, infix_type **, infix_type *, size_t)
 Creates a new SIMD vector type.
 
infix_struct_member infix_type_create_member (const char *, infix_type *, size_t)
 A factory function to create an infix_struct_member.
 
c23_nodiscard size_t infix_forward_get_num_fixed_args (const infix_forward_t *)
 Gets the number of fixed (non-variadic) arguments for a forward trampoline.
 
c23_nodiscard const infix_typeinfix_forward_get_return_type (const infix_forward_t *)
 Gets the return type for a forward trampoline.
 
c23_nodiscard const infix_typeinfix_forward_get_arg_type (const infix_forward_t *, size_t)
 Gets the type of a specific argument for a forward trampoline.
 
c23_nodiscard size_t infix_reverse_get_num_args (const infix_reverse_t *)
 Gets the total number of arguments for a reverse trampoline.
 
c23_nodiscard const infix_typeinfix_reverse_get_return_type (const infix_reverse_t *)
 Gets the return type for a reverse trampoline.
 
c23_nodiscard size_t infix_reverse_get_num_fixed_args (const infix_reverse_t *)
 Gets the number of fixed (non-variadic) arguments for a reverse trampoline.
 
c23_nodiscard const infix_typeinfix_reverse_get_arg_type (const infix_reverse_t *, size_t)
 Gets the type of a specific argument for a reverse trampoline.
 
c23_nodiscard const char * infix_type_get_name (const infix_type *)
 Gets the semantic alias of a type, if one exists.
 
c23_nodiscard infix_type_category infix_type_get_category (const infix_type *)
 Gets the fundamental category of a type.
 
c23_nodiscard size_t infix_type_get_size (const infix_type *)
 Gets the size of a type in bytes.
 
c23_nodiscard size_t infix_type_get_alignment (const infix_type *)
 Gets the alignment requirement of a type in bytes.
 
c23_nodiscard size_t infix_type_get_member_count (const infix_type *)
 Gets the number of members in a struct or union type.
 
c23_nodiscard const infix_struct_memberinfix_type_get_member (const infix_type *, size_t)
 Gets a specific member from a struct or union type.
 
c23_nodiscard const char * infix_type_get_arg_name (const infix_type *, size_t)
 Gets the name of a specific argument from a function type.
 
c23_nodiscard const infix_typeinfix_type_get_arg_type (const infix_type *, size_t)
 Gets the type of a specific argument from a function type.
 

Detailed Description

The core data structures and APIs for describing C types and function signatures.

infix uses a powerful, introspectable type system to represent C types. These structures can be created programmatically using the Manual API or parsed from human-readable signature strings.

Typedef Documentation

◆ infix_arena_t

typedef struct infix_arena_t infix_arena_t

An opaque handle to an arena allocator, used for efficient grouped memory allocations.

◆ infix_context_t

An alias for infix_reverse_t, used to clarify its role as a context object in closure handlers.

◆ infix_forward_t

An opaque handle to a forward (C-to-native) trampoline. Created by infix_forward_create and variants.

◆ infix_function_argument

A semi-opaque object describing an argument to a C function. See infix_function_argument_t for details.

◆ infix_library_t

An opaque handle to a dynamically loaded shared library (.so, .dll, .dylib).

◆ infix_registry_t

An opaque handle to a named type registry.

◆ infix_reverse_t

An opaque handle to a reverse (native-to-C) trampoline, also known as a callback or closure.

◆ infix_struct_member

A semi-opaque object describing a member of a C struct or union. See infix_struct_member_t for details.

◆ infix_type

typedef struct infix_type_t infix_type

A semi-opaque object describing a C type's memory layout and calling convention. See infix_type_t for details.

Enumeration Type Documentation

◆ infix_aggregate_category_t

Specifies whether a named type reference refers to a struct or a union.

Enumerator
INFIX_AGGREGATE_STRUCT 
INFIX_AGGREGATE_UNION 

◆ infix_primitive_type_id

Enumerates the supported primitive C types.

Enumerator
INFIX_PRIMITIVE_BOOL 

bool or _Bool.

INFIX_PRIMITIVE_UINT8 

uint8_t.

INFIX_PRIMITIVE_SINT8 

int8_t.

INFIX_PRIMITIVE_UINT16 

uint16_t.

INFIX_PRIMITIVE_SINT16 

int16_t.

INFIX_PRIMITIVE_UINT32 

uint32_t.

INFIX_PRIMITIVE_SINT32 

int32_t.

INFIX_PRIMITIVE_UINT64 

uint64_t.

INFIX_PRIMITIVE_SINT64 

int64_t.

INFIX_PRIMITIVE_UINT128 

__uint128_t (GCC/Clang extension).

INFIX_PRIMITIVE_SINT128 

__int128_t (GCC/Clang extension).

INFIX_PRIMITIVE_FLOAT 

float.

INFIX_PRIMITIVE_DOUBLE 

double.

INFIX_PRIMITIVE_LONG_DOUBLE 

long double.

◆ infix_type_category

Enumerates the fundamental categories of types that infix can represent.

Enumerator
INFIX_TYPE_PRIMITIVE 

A fundamental C type like int, float, or double.

INFIX_TYPE_POINTER 

A pointer to another infix_type.

INFIX_TYPE_STRUCT 

A C struct.

INFIX_TYPE_UNION 

A C union.

INFIX_TYPE_ARRAY 

A fixed-size C array.

INFIX_TYPE_REVERSE_TRAMPOLINE 

A function pointer type, used internally by the signature parser.

INFIX_TYPE_ENUM 

A C enum, represented by its underlying integer type.

INFIX_TYPE_COMPLEX 

A C99 _Complex number.

INFIX_TYPE_VECTOR 

A SIMD vector type.

INFIX_TYPE_NAMED_REFERENCE 

A placeholder for a named type to be resolved by a registry.

INFIX_TYPE_VOID 

The void type, valid only as a function return type.

Function Documentation

◆ infix_forward_get_arg_type()

c23_nodiscard const infix_type * infix_forward_get_arg_type ( const infix_forward_t trampoline,
size_t  index 
)

Gets the type of a specific argument for a forward trampoline.

Parameters
[in]trampolineThe trampoline handle.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the infix_type, or nullptr if the index is out of bounds.
Parameters
[in]trampolineThe trampoline handle.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the infix_type, or nullptr if the index is out of bounds or trampoline is nullptr.

◆ infix_forward_get_num_fixed_args()

c23_nodiscard size_t infix_forward_get_num_fixed_args ( const infix_forward_t trampoline)

Gets the number of fixed (non-variadic) arguments for a forward trampoline.

Parameters
[in]trampolineThe trampoline handle.
Returns
The number of fixed arguments.
Parameters
[in]trampolineThe trampoline handle.
Returns
The number of fixed arguments, or 0 if trampoline is nullptr.

◆ infix_forward_get_return_type()

c23_nodiscard const infix_type * infix_forward_get_return_type ( const infix_forward_t trampoline)

Gets the return type for a forward trampoline.

Parameters
[in]trampolineThe trampoline handle.
Returns
A pointer to the infix_type for the return value, or nullptr.
Parameters
[in]trampolineThe trampoline handle.
Returns
A pointer to the infix_type for the return value, or nullptr if trampoline is nullptr.

◆ infix_reverse_get_arg_type()

c23_nodiscard const infix_type * infix_reverse_get_arg_type ( const infix_reverse_t trampoline,
size_t  index 
)

Gets the type of a specific argument for a reverse trampoline.

Parameters
[in]trampolineThe trampoline context handle.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the infix_type, or nullptr if the index is out of bounds.
Parameters
[in]trampolineThe trampoline context handle.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the infix_type, or nullptr if the index is out of bounds or trampoline is nullptr.

◆ infix_reverse_get_num_args()

c23_nodiscard size_t infix_reverse_get_num_args ( const infix_reverse_t trampoline)

Gets the total number of arguments for a reverse trampoline.

Parameters
[in]trampolineThe trampoline context handle.
Returns
The number of arguments, or 0 if trampoline is nullptr.

◆ infix_reverse_get_num_fixed_args()

c23_nodiscard size_t infix_reverse_get_num_fixed_args ( const infix_reverse_t trampoline)

Gets the number of fixed (non-variadic) arguments for a reverse trampoline.

Parameters
[in]trampolineThe trampoline context handle.
Returns
The number of fixed arguments.
Parameters
[in]trampolineThe trampoline context handle.
Returns
The number of fixed arguments, or 0 if trampoline is nullptr.

◆ infix_reverse_get_return_type()

c23_nodiscard const infix_type * infix_reverse_get_return_type ( const infix_reverse_t trampoline)

Gets the return type for a reverse trampoline.

Parameters
[in]trampolineThe trampoline context handle.
Returns
A pointer to the infix_type for the return value, or nullptr.
Parameters
[in]trampolineThe trampoline context handle.
Returns
A pointer to the infix_type for the return value, or nullptr if trampoline is nullptr.

◆ infix_type_create_array()

c23_nodiscard infix_status infix_type_create_array ( infix_arena_t arena,
infix_type **  out_type,
infix_type element_type,
size_t  num_elements 
)

Creates a new fixed-size array type.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]element_typeThe type of each element in the array.
[in]num_elementsThe number of elements.
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_complex()

c23_nodiscard infix_status infix_type_create_complex ( infix_arena_t arena,
infix_type **  out_type,
infix_type base_type 
)

Creates a new _Complex number type.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]base_typeThe base floating-point type (float or double).
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_enum()

c23_nodiscard infix_status infix_type_create_enum ( infix_arena_t arena,
infix_type **  out_type,
infix_type underlying_type 
)

Creates a new enum type with a specified underlying integer type.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]underlying_typeThe integer infix_type (e.g., from infix_type_create_primitive(INFIX_PRIMITIVE_SINT32)).
Returns
INFIX_SUCCESS on success.
Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]underlying_typeThe integer infix_type (e.g., from infix_type_create_primitive(INFIX_PRIMITIVE_SINT32)).
Returns
INFIX_SUCCESS on success, or INFIX_ERROR_INVALID_ARGUMENT if the underlying type is not an integer.

◆ infix_type_create_member()

infix_struct_member infix_type_create_member ( const char *  name,
infix_type type,
size_t  offset 
)

A factory function to create an infix_struct_member.

Parameters
[in]nameThe name of the member (optional, can be nullptr).
[in]typeThe infix_type of the member.
[in]offsetThe byte offset of the member. This is ignored by infix_type_create_struct.
Returns
An initialized infix_struct_member object.
Parameters
[in]nameThe name of the member (optional, can be nullptr).
[in]typeThe infix_type of the member.
[in]offsetThe byte offset of the member from the start of its parent aggregate.
Returns
An initialized infix_struct_member object.

◆ infix_type_create_named_reference()

c23_nodiscard infix_status infix_type_create_named_reference ( infix_arena_t arena,
infix_type **  out_type,
const char *  name,
infix_aggregate_category_t  agg_cat 
)

Creates a placeholder for a named type to be resolved by a registry.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]nameThe name of the type (e.g., "MyStruct").
[in]agg_catThe expected category of the aggregate (struct or union).
Returns
INFIX_SUCCESS on success.

Creates a placeholder for a named type to be resolved by a registry.

This is a key component for defining recursive or mutually-dependent types. The created type has a size and alignment of 0/1, which are updated during the "Resolve" and "Layout" stages of the pipeline.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]nameThe name of the type (e.g., "MyStruct").
[in]agg_catThe expected category of the aggregate (struct or union).
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_packed_struct()

c23_nodiscard infix_status infix_type_create_packed_struct ( infix_arena_t arena,
infix_type **  out_type,
size_t  total_size,
size_t  alignment,
infix_struct_member members,
size_t  num_members 
)

Creates a new packed struct type with a user-specified layout.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]total_sizeThe total size of the packed struct in bytes.
[in]alignmentThe alignment requirement of the struct (e.g., 1 for #pragma pack(1)).
[in]membersAn array of infix_struct_member with pre-calculated offsets.
[in]num_membersThe number of members.
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_pointer()

c23_nodiscard infix_type * infix_type_create_pointer ( void  )

Creates a static descriptor for a generic pointer (void*).

Returns
A pointer to the static infix_type descriptor. Does not need to be freed.

◆ infix_type_create_pointer_to()

c23_nodiscard infix_status infix_type_create_pointer_to ( infix_arena_t arena,
infix_type **  out_type,
infix_type pointee_type 
)

Creates a new pointer type that points to a specific type.

Parameters
[in]arenaThe arena to allocate the new type object in.
[out]out_typeA pointer to receive the created infix_type.
[in]pointee_typeThe type that the new pointer will point to.
Returns
INFIX_SUCCESS on success.
Parameters
[in]arenaThe arena to allocate the new type object in.
[out]out_typeA pointer to receive the created infix_type.
[in]pointee_typeThe infix_type that the new pointer will point to.
Returns
INFIX_SUCCESS on success, or an error code on allocation failure.

◆ infix_type_create_primitive()

c23_nodiscard infix_type * infix_type_create_primitive ( infix_primitive_type_id  id)

Creates a static descriptor for a primitive C type.

Parameters
[in]idThe infix_primitive_type_id of the desired primitive type.
Returns
A pointer to the static infix_type descriptor. Does not need to be freed.
Parameters
[in]idThe infix_primitive_type_id of the desired primitive type.
Returns
A pointer to the corresponding static infix_type singleton descriptor. This pointer does not need to be freed.

◆ infix_type_create_struct()

c23_nodiscard infix_status infix_type_create_struct ( infix_arena_t arena,
infix_type **  out_type,
infix_struct_member members,
size_t  num_members 
)

Creates a new struct type from an array of members, calculating layout automatically.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]membersAn array of infix_struct_member describing the struct's layout. The offset field is ignored.
[in]num_membersThe number of members in the array.
Returns
INFIX_SUCCESS on success.
Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]membersAn array of infix_struct_member describing the struct's members. The offset field is ignored.
[in]num_membersThe number of members in the array.
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_union()

c23_nodiscard infix_status infix_type_create_union ( infix_arena_t arena,
infix_type **  out_type,
infix_struct_member members,
size_t  num_members 
)

Creates a new union type from an array of members.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]membersAn array of infix_struct_member describing the union's members.
[in]num_membersThe number of members.
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_vector()

c23_nodiscard infix_status infix_type_create_vector ( infix_arena_t arena,
infix_type **  out_type,
infix_type element_type,
size_t  num_elements 
)

Creates a new SIMD vector type.

Parameters
[in]arenaThe arena for allocation.
[out]out_typeA pointer to receive the new infix_type.
[in]element_typeThe primitive type of each element.
[in]num_elementsThe number of elements in the vector.
Returns
INFIX_SUCCESS on success.

◆ infix_type_create_void()

c23_nodiscard infix_type * infix_type_create_void ( void  )

Creates a static descriptor for the void type.

Returns
A pointer to the static infix_type descriptor. Does not need to be freed.

◆ infix_type_get_alignment()

c23_nodiscard size_t infix_type_get_alignment ( const infix_type type)

Gets the alignment requirement of a type in bytes.

Parameters
[in]typeThe type object to inspect.
Returns
The alignment in bytes.
Parameters
[in]typeThe type object to inspect.
Returns
The alignment in bytes, or 0 if type is nullptr.

◆ infix_type_get_arg_name()

c23_nodiscard const char * infix_type_get_arg_name ( const infix_type func_type,
size_t  index 
)

Gets the name of a specific argument from a function type.

Parameters
[in]func_typeThe function type object to inspect (INFIX_TYPE_REVERSE_TRAMPOLINE).
[in]indexThe zero-based index of the argument.
Returns
The name of the argument, or nullptr if anonymous or out of bounds.
Parameters
[in]func_typeThe function type object to inspect (must have category INFIX_TYPE_REVERSE_TRAMPOLINE).
[in]indexThe zero-based index of the argument.
Returns
The name of the argument as a string, or nullptr if the argument is anonymous or the index is out of bounds.

◆ infix_type_get_arg_type()

c23_nodiscard const infix_type * infix_type_get_arg_type ( const infix_type func_type,
size_t  index 
)

Gets the type of a specific argument from a function type.

Parameters
[in]func_typeThe function type object to inspect.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the infix_type, or nullptr if the index is out of bounds.
Parameters
[in]func_typeThe function type object to inspect.
[in]indexThe zero-based index of the argument.
Returns
A pointer to the argument's infix_type, or nullptr if the index is out of bounds.

◆ infix_type_get_category()

c23_nodiscard infix_type_category infix_type_get_category ( const infix_type type)

Gets the fundamental category of a type.

Parameters
[in]typeThe type object to inspect.
Returns
The infix_type_category enum value.
Parameters
[in]typeThe type object to inspect.
Returns
The infix_type_category enum value, or -1 if type is nullptr.

◆ infix_type_get_member()

c23_nodiscard const infix_struct_member * infix_type_get_member ( const infix_type type,
size_t  index 
)

Gets a specific member from a struct or union type.

Parameters
[in]typeThe aggregate type object to inspect.
[in]indexThe zero-based index of the member.
Returns
A pointer to the infix_struct_member, or nullptr if the index is out of bounds.
Parameters
[in]typeThe aggregate type object to inspect.
[in]indexThe zero-based index of the member.
Returns
A pointer to the infix_struct_member, or nullptr if the index is out of bounds or the type is invalid.

◆ infix_type_get_member_count()

c23_nodiscard size_t infix_type_get_member_count ( const infix_type type)

Gets the number of members in a struct or union type.

Parameters
[in]typeThe aggregate type object to inspect.
Returns
The number of members, or 0 if the type is not a struct or union.
Parameters
[in]typeThe aggregate type object to inspect. Must have category INFIX_TYPE_STRUCT or INFIX_TYPE_UNION.
Returns
The number of members, or 0 if the type is not a struct or union.

◆ infix_type_get_name()

c23_nodiscard const char * infix_type_get_name ( const infix_type type)

Gets the semantic alias of a type, if one exists.

Parameters
[in]typeThe type object to inspect.
Returns
The name of the type if it was created from a registry alias (e.g., "MyInt"), or nullptr if the type is anonymous.

◆ infix_type_get_size()

c23_nodiscard size_t infix_type_get_size ( const infix_type type)

Gets the size of a type in bytes.

Parameters
[in]typeThe type object to inspect.
Returns
The size in bytes.
Parameters
[in]typeThe type object to inspect.
Returns
The size in bytes, or 0 if type is nullptr.