isInputRange as a __traits ?

user1234 user1234 at 12.ie
Sat Oct 7 10:46:05 UTC 2017


On Saturday, 7 October 2017 at 10:40:16 UTC, Jonathan M Davis 
wrote:
> On Saturday, October 07, 2017 10:31:01 user1234 via 
> Digitalmars-d 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) ?
>
> Why? What would we gain from that?

I've replied in another answer, so again, the idea is to save a 
bit of time spent to compile.





More information about the Digitalmars-d mailing list