How to break const

Timon Gehr timon.gehr at gmx.ch
Wed Jun 20 08:26:58 PDT 2012


On 06/20/2012 05:24 PM, Timon Gehr wrote:
>
> static assert(is(typeof(immutable(S).mutable)==R delegate(A) immutable));
> static assert(is(typeof(immutable(S).const_)==R delegate(A) immutable));
>
>

Actually,

static assert(is(typeof(cast()immutable(S).mutable)==R delegate(A) 
immutable));
static assert(is(typeof(cast()immutable(S).const_)==R delegate(A) 
immutable));


More information about the Digitalmars-d mailing list