Jonathan M Davis <jmdavisp...@gmx.com> wrote:

So, _I_ am certainly not aware of a good solution, but if you play games, you should be able to get _something_ working. Overall though, I think that the lesson is that you should really be making const functions truly const and not
try and deal with logical const at all.

Highly unsafe, but works in the cases you'd expect. Use with extreme
caution:


import std.traits;
@system
ref Unqual!T unqualified( T )( ref const T t ) {
    Unqual!(T)* p = cast(Unqual!(T)*)&t;
    return *p;
}

--
Simen

Reply via email to