Simen kjaeraas:

> 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

I can't say this is a nice syntax :-)
(Isn't the implicit conversion + bound test better?)

Bye,
bearophile

Reply via email to