A Briefer Syntax for Using Concepts

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 07:05:00 PDT 2014


On Wednesday, 7 May 2014 at 12:47:29 UTC, Sergei Nosov wrote:
> void foo(InputRange range1, InputRange range2); // how to 
> specify that InputRange should be exactly the same type? or 
> possibly distinct types?

One thing to consider would be that InputRange wouldn't be a type 
itself, but range1 and range2 would have types. I suppose you do 
do things like if(typeof(range1) == typeof(range2)) and so on.


More information about the Digitalmars-d mailing list