mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
11 lines
189 B
Nim
11 lines
189 B
Nim
discard """
|
|
action: compile
|
|
"""
|
|
|
|
type
|
|
Ct*[T: SomeUnsignedInt] = distinct T
|
|
|
|
template `shr`*[T: Ct](x: T, y: SomeInteger): T = T(T.T(x) shr y)
|
|
|
|
var x: Ct[uint64]
|
|
let y {.used.} = x shr 2 |