missing __traits(isArray, T)? what's the difference between __traits & std.traits? can we remove one to avoid dup?
mw
mingwu at gmail.com
Sun Jun 6 00:52:32 UTC 2021
Hi,
I'm checking:
https://dlang.org/library/object/destroy.html
```
...
if (__traits(isStaticArray, T));
```
and want to try `__traits(isArray, T)` in my code, but the
compiler complains it's not there,
Then I found std.traits.isArray!T here:
https://dlang.org/phobos/std_traits.html
which has much more traits defined than:
https://dlang.org/spec/traits.html#isStaticArray ...
I read both can be used at compile time, I'm wondering is there
any difference between __traits & std.traits?
If there is no difference between this two mechanisms, should we
completely move all the `__traits` stuff into std.traits to avoid
duplication?
More information about the Digitalmars-d
mailing list