nim-stew/std_shims/objects.nim

5 lines
109 B
Nim

template init*(lvalue: var auto, args: varargs[untyped]) =
mixin init
lvalue = init(type(lvalue), args)