Spec#, nullables and more

Walter Bright newshound2 at digitalmars.com
Sat Nov 6 11:18:31 PDT 2010


Simen kjaeraas wrote:
> Bounded!(int, 1, 5)[] myArr;
> myArr ~= 1; // Compile-time error: int is not implicitly castable to 
> Bounded!(int, 1, 5)
> myArr ~= Bounded!(int, 1, 5)( 1 ); // Works perfectly

Yes, that's it.


More information about the Digitalmars-d mailing list