untyped 可变参数
除了 untyped 元类型可以阻止类型检查之外,用了 varargs[untyped] 连参数的个数也不检查的了:
template hideIdentifiers(x: varargs[untyped]) = discard
hideIdentifiers(undeclared1, undeclared2)
然而,因为模板不能遍历可变参数,一般而言这个功能在宏中更有用。
当前内容版权归 vectorworkshopbaoerjie 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 vectorworkshopbaoerjie .