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

Timothee Cour via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 19:41:12 PDT 2015


how to do iota(0,256) with ubytes ?
and more generally:
iota with 'end' parameter set to max range of a type.

of course this doesn't work:
auto b=iota(ubyte(0), ubyte(256));
//cannot implicitly convert expression (256) of type int to ubyte

Could we have a function with iota_inclusive that has inclusive bounds for
'end' parameter ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20151008/de9cee2f/attachment.html>


More information about the Digitalmars-d mailing list