how to do iota(0,256) with ubytes ? (cf need for iotaInclusive)

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 12 09:34:10 PDT 2015


On 10/12/15 11:20 AM, Per Nordlöw wrote:
> On Friday, 9 October 2015 at 02:41:50 UTC, Timothee Cour wrote:
>> of course this doesn't work:
>> auto b=iota(ubyte(0), ubyte(256));
>> //cannot implicitly convert expression (256) of type int to ubyte
>
> What about adding an overload supporting
>
>      iota!ubyte(0, 256)

We can add iota!T() with no arguments that spans the entire range of T 
(integral). -- Andrei


More information about the Digitalmars-d mailing list