parent
84351da9d8
commit
c9f49cbc0a
5 changed files with 30 additions and 13 deletions
|
|
@ -175,4 +175,19 @@ proc myfuncLoop(x: int): MySeqNonCopyable =
|
|||
var cc = newMySeq(i, 5.0)
|
||||
result = cc
|
||||
|
||||
discard myfuncLoop(3)
|
||||
discard myfuncLoop(3)
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Move into table via openarray
|
||||
#------------------------------------------------------------
|
||||
|
||||
type
|
||||
TableNonCopyable = object
|
||||
x: seq[(string, MySeqNonCopyable)]
|
||||
|
||||
proc toTable(pairs: sink openArray[(string, MySeqNonCopyable)]): TableNonCopyable =
|
||||
discard
|
||||
|
||||
|
||||
let mytable = {"a": newMySeq(2, 5.0)}.toTable
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue