Unqual for @safe @system and @trusted

Johannes Pfau spam at example.com
Sat Dec 11 08:08:32 PST 2010


Is there something like Unqual that can remove the safety attributes from  
a type?

Unqual doesn't work:
-----------------------------------------------------------------------------------
class handler
{
     @safe void opCall(int i) {}
}

static assert(is(Unqual!(typeof(&(handler.init.opCall))) == void  
delegate(int)));
-----------------------------------------------------------------------------------
event.d(554): Error: static assert  (is(void delegate(int i) @safe == void  
delegate(int b))) is false

-- 
Johannes Pfau


More information about the Digitalmars-d-learn mailing list