DIP10005: Dependency-Carrying Declarations is now available for community feedback

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 14 09:30:02 PST 2016


On 12/14/2016 12:28 PM, Anonymouse wrote:
> On Wednesday, 14 December 2016 at 17:24:29 UTC, Anonymouse wrote:
>> The with keyword then?
>>
>> bool equal(R1, R2)
>> with (std.range : isInputRange, isOutputRange) && (std.stdio :
>> writeln) && (std.algorithm)
>> if (isInputRange!R1 && isInputRange!R2)
>> { ... }
>
> I guess the &&s there don't make sense. Maybe with a semicolon delimeter
> instead.
>
> bool equal(R1, R2)
> with (std.range : isInputRange, isOutputRange; std.stdio : writeln;
> std.algorithm)
> if (isInputRange!R1 && isInputRange!R2)
> { ... }

This would not pass either. -- Andrei


More information about the Digitalmars-d mailing list