Loosen constraint on the Key type in rb & avl tree

The current constraint on the `init_ordered' function accepts only
numeric types. While one still can init a non-numerically-keyed tree by
passing a comparator explicitly, the reason to disallow non-numeric
ordered types is nowhere to be found.
This commit is contained in:
destroycomputers
2024-06-18 13:31:45 +02:00
parent dd364c0c0f
commit de44dd5412
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ init_cmp :: proc(
init_ordered :: proc(
t: ^$T/Tree($Value),
node_allocator := context.allocator,
) where intrinsics.type_is_ordered_numeric(Value) {
) where intrinsics.type_is_ordered(Value) {
init_cmp(t, slice.cmp_proc(Value), node_allocator)
}