Identifier construction

In templates identifiers can be constructed with the backticks notation:

  1. template typedef(name: untyped, typ: typedesc) =
  2. type
  3. `T name`* {.inject.} = typ
  4. `P name`* {.inject.} = ref `T name`
  5. typedef(myint, int)
  6. var x: PMyInt

In the example name is instantiated with myint, so `T name` becomes Tmyint.