mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 22:13:29 +00:00
Added test case
Previously offending code
This commit is contained in:
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]()
|
||||
Reference in New Issue
Block a user