Why I chose D over Ada and Eiffel

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Aug 29 07:34:26 PDT 2013


On 29/08/13 16:13, John Colvin wrote:
> struct Limited(T, T lower, T upper)
> {
>      T _t;
>      mixin Proxy!_t; //Limited acts as T (almost)
>      invariant()
>      {
>          enforce(_t >= lower && _t <= upper);
>      }
>      this(T t)
>      {
>          _t = t;
>      }
> }

Is the invariant() not going to be stripped out at compile time if you use 
-release ?


More information about the Digitalmars-d mailing list