diff options
| author | FourteenBrush <74827262+FourteenBrush@users.noreply.github.com> | 2025-07-11 17:17:30 +0200 |
|---|---|---|
| committer | FourteenBrush <74827262+FourteenBrush@users.noreply.github.com> | 2025-07-11 17:17:30 +0200 |
| commit | cb05271157a944c934dd8bf015570f25ebd2eccc (patch) | |
| tree | 60fd8cb441c0bbbac7b573b903361f696b468d4c /base | |
| parent | 56c221e211a7336326d04ba6a1240f5f47f6f723 (diff) | |
Add note on sparse vs contiguous
Diffstat (limited to 'base')
| -rw-r--r-- | base/intrinsics/intrinsics.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/intrinsics/intrinsics.odin b/base/intrinsics/intrinsics.odin index dc1690ba8..c0685f4db 100644 --- a/base/intrinsics/intrinsics.odin +++ b/base/intrinsics/intrinsics.odin @@ -213,7 +213,8 @@ type_is_subtype_of :: proc($T, $U: typeid) -> bool --- type_field_index_of :: proc($T: typeid, $name: string) -> uintptr --- -// Contiguous as in having a set of constants, when sorted, the difference between consecutive constants is only 0 or 1 +// "Contiguous" means that the set of enum constants, when sorted, have a difference of either 0 or 1 between consecutive values. +// This is the exact opposite of "sparse". type_enum_is_contiguous :: proc($T: typeid) -> bool where type_is_enum(T) --- type_equal_proc :: proc($T: typeid) -> (equal: proc "contextless" (rawptr, rawptr) -> bool) where type_is_comparable(T) --- |