isInputRange as a __traits ?
Computermatronic
computermatronic at gmail.com
Sat Oct 7 10:38:53 UTC 2017
On Saturday, 7 October 2017 at 10:31:01 UTC, user1234 wrote:
> Since the compiler has the ability to detect input ranges in
> the foreach aggregate that are aggregates implementing the
> right primitives, why don't you set the widely used
> std.range.isInputRange as a __trait, e.g __traits(isInputRange,
> Stuff) ?
Because the __traits expression is supposed to be a fallback in
place of where std.traits cannot be used, and should see minimum
use.
More information about the Digitalmars-d
mailing list