mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix to "typeid.kind". Conversion unsigned int -> enum fixed. @autoimport -> @builtin. Comparison macros. Bump to 0.2.21
This commit is contained in:
committed by
Christoffer Lerno
parent
036859c0c8
commit
b313bec69d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user