Added test case
Previously offending code
This commit is contained in:
parent
174205bcae
commit
01ca3ba26d
1 changed files with 9 additions and 0 deletions
9
tests/cpp/ttemplatetype.nim
Normal file
9
tests/cpp/ttemplatetype.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
type
|
||||
Map {.importcpp: "std::map", header: "<map>".} [T,U] = object
|
||||
|
||||
proc cInitMap(T: typedesc, U: typedesc): Map[T,U] {.importcpp: "std::map<'*1,'*2>()", nodecl.}
|
||||
|
||||
proc initMap[T, U](): Map[T, U] =
|
||||
result = cInitMap(T, U)
|
||||
|
||||
var x: Map[cstring, cint] = initMap[cstring, cint]()
|
||||
Loading…
Add table
Add a link
Reference in a new issue