Module: unique-ptr
A unique pointer module. Apart from the UniquePtr
macro and concept
macro, the documentation in this module is for a generated unique
pointer instance of type T
.
Linkage: N/A
Members: N/A
The core unique pointer structure type.
Linkage: extern
Returns: bool
Parameters:
(loc (ref (UniquePtr T)))
: The unique pointer.(value (p T))
: The value to assign to the unique pointer.
Initialise the unique pointer structure with a pointer. Once the structure has been initialised with the pointer, it takes ownership of it. The structure assumes that the pointer was created by way of malloc.
Linkage: extern
Returns: bool
Parameters:
(loc (ref (UniquePtr T)))
: The unique pointer.
Initialise an empty/null unique pointer structure.
Linkage: extern
Returns: (p T)
Parameters:
(mloc (ref (UniquePtr T)))
: The unique pointer.
Returns the underlying pointer.
Linkage: extern
Returns: T
Parameters:
(mloc (ref (UniquePtr T)))
: The unique pointer.
Dereferencing the unique pointer returns the value from the underlying pointer.
Linkage: extern
Parameters:
(T Type)
: The type node.
Expands to a UniquePtr
definition over the relevant type.
Linkage: extern
Parameters:
T
: The type node.
Expands to the concrete type name of the UniquePtr
generated by way
of the concept macro.