Fix to "typeid.kind". Conversion unsigned int -> enum fixed. @autoimport -> @builtin. Comparison macros. Bump to 0.2.21

This commit is contained in:
Christoffer Lerno
2022-07-22 17:04:30 +02:00
committed by Christoffer Lerno
parent 036859c0c8
commit b313bec69d
15 changed files with 210 additions and 39 deletions

View File

@@ -23,26 +23,6 @@
module std::priorityqueue<Type>;
import std::array::list;
// Helper macros to allow arbitrary non-primitive types to be comparable
private macro bool less(Type x, Type y)
{
$if ($defined(Type.less)):
return x.less(y);
$else:
return x < y;
$endif;
}
private macro bool greater(Type x, Type y)
{
$if ($defined(Type.greater)):
return x.greater(y);
$else:
return x > y;
$endif;
}
define Heap = List<Type>;
struct PriorityQueue