我是D新手,所以我可能会完全搞错,请赐教!
据我从文档中了解到, D 提供了用于查找函数参数装饰的特征:
void fooref(ref int x) {
static assert(__traits(isRef, x));
static assert(!__traits(isOut, x));
static assert(!__traits(isLazy, x));
}
void fooout(out int x) {
static assert(!__traits(isRef, x));
static assert(__traits(isOut, x));
static assert(!__traits(isLazy, x));
}
void foolazy(lazy int x) {
static assert(!__traits(isRef, x));
static assert(!__traits(isOut, x));
static assert(__traits(isLazy, x));
}
为什么没有发现in
装饰的特征?