How to attach function attributes to delegate type?
    Q. Schroll 
    qs.il.paperinik at gmail.com
       
    Wed Feb 27 20:03:15 UTC 2019
    
    
  
For any type constructors like const, I can use ConstOf!T to get 
`T` with const attached. For a delegate/function type DG, e.g. 
int delegate(int), how can I get the @safe version of that type, 
i.e. int delegate(int) @safe?
I tried
     alias SafeOf(DG) = DG @safe;
but it didn't compile.
The case is not @safe-specific; it's the same for all function 
attributes.
    
    
More information about the Digitalmars-d-learn
mailing list