A Briefer Syntax for Using Concepts

Orvid King via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 07:49:07 PDT 2014


On 5/7/14, w0rp via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> void foo(InputRange range);

How to make it accept multiple types? Simple, we already have template
constraints, so this would be how to do it, where T is the element
type of the input range:

void foo(T)(InputRange!T range);


More information about the Digitalmars-d mailing list