Why is Phobos' isIntegral different from the built-in trait of the very same name?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Oct 17 14:36:02 UTC 2021
According to https://github.com/dlang/phobos/blob/master/std/traits.d#L6191:
=====
Detect whether `T` is a built-in integral type. Types `bool`, `char`,
`wchar`, and `dchar` are not considered integral.
=====
Not considered by whom? Certainly they are considered by the language
per __traits(isIntegral). Also all conversion rules scream "they're
integral!"
We even use the built-in trait to create a _different_ one!
Why do we have a slightly different with no added usabilty in the
standard library?
More information about the Digitalmars-d
mailing list