RetroDev256/instinct
This repository has no description.
An ultra simple set of distinct integer types.
pub fn OptionalRangedInt(
comptime T: type,
comptime type_id: u32,
comptime range: Range(T),
comptime null_value: T,
) type { ... }
pub fn OptionalInt(
comptime T: type,
comptime type_id: u32,
comptime null_value: T,
) type { ... }
pub fn RangedInt(
comptime T: type,
comptime type_id: u32,
comptime range: Range(T),
) type { ... }
pub fn Int(
comptime T: type,
comptime type_id: u32,
) type { ... }
Each type provides the following methods:
init
creates a new distinct typeset
changes the value of the distinct typeval
fetches the value of the distinct typecast
converts the distinct type to another distinct type
Limitation: you can't directly cast from an optional to non-optional type