diff options
Diffstat (limited to 'lib/system/helpers2.nim')
-rw-r--r-- | lib/system/helpers2.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system/helpers2.nim b/lib/system/helpers2.nim new file mode 100644 index 000000000..1c9e7c068 --- /dev/null +++ b/lib/system/helpers2.nim @@ -0,0 +1,5 @@ +template formatErrorIndexBound*[T](i, a, b: T): string = + "index out of bounds: (a:" & $a & ") <= (i:" & $i & ") <= (b:" & $b & ") " + +template formatErrorIndexBound*[T](i, n: T): string = + "index out of bounds: (i:" & $i & ") <= (n:" & $n & ") " |