typetraits: add toSigned, toUnsigned (#18445)
* typetraits: add toSigned, toUnsigned * improve and add tests Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: flywind <xzsflywind@gmail.com>
This commit is contained in:
parent
1807de38e5
commit
e78ef57c93
7 changed files with 85 additions and 33 deletions
|
|
@ -2,10 +2,10 @@ discard """
|
|||
targets: "c cpp js"
|
||||
"""
|
||||
|
||||
# xxx merge with tests/metatype/ttypetraits.nim
|
||||
|
||||
import std/typetraits
|
||||
|
||||
|
||||
|
||||
macro testClosure(fn: typed, flag: static bool) =
|
||||
if flag:
|
||||
doAssert hasClosure(fn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue