tgenericinst.nim 253 B

1234567891011
  1. discard """
  2. cmd: "nim cpp --incremental:on $file"
  3. """
  4. {.emit:"""/*TYPESECTION*/
  5. #include <iostream>
  6. struct Foo { };
  7. """.}
  8. type Foo {.importcpp.} = object
  9. echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo