C++ bounded::integer library

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Mon May 19 12:54:06 PDT 2014


Nordlöw:

>> Bound!byte b = 200;
>
> This is already handled
>
> For example
>
>     const b127 = saturated!byte(127);
>
> compiles but
>
>     const b128 = saturated!byte(128);
>
> errors as
>
> bound.d(421,32): Error: saturated (inout(byte) x) is not 
> callable using argument types (int)

Is this giving a compile-time error?

saturated!byte b = 127;

Bye,
bearophile


More information about the Digitalmars-d mailing list