Open 0xE111 opened 4 years ago
May be helpful: https://forum.nim-lang.org/t/4545
template typedef(name: untyped, typ: typedesc) =
type
`T name`* {.inject.} = typ
`P name`* {.inject.} = ref `T name`
typedef(myint, int)
var x: PMyInt
In the example name is instantiated with myint, so T name
becomes Tmyint.
Per https://forum.nim-lang.org/t/3199