inlining or not inlining...
    Christopher Nicholson-Sauls 
    ibisbasenji at gmail.com
       
    Sat Feb 12 01:46:19 PST 2011
    
    
  
> 
> All of this is hardly related to the simple feature I initially asked for:
> 
>     string escString (string s) @tellmeifnotinlined {
>         s2 = s.replace("\n","\\n");
>         s2 = s.replace("\t","\\t");
>             return s2;
>         }
>     void show (X x) {
>         // ... use escString ...
>         }
> ==>
>     Warning: function 'escString' in module 'foo' (line 123) was not
> inlined.
>     (or else it was actually inlined)
> 
> Which (I guess) is not that a big deal since the compiler needs to
> decide anyway. I just wish to be informed of the result of the decision
> procedure, only in case of 'no'.
> 
> Denis
I could really go for that, myself.  Occasionally I've wanted such a
beasty.  I really do think it makes more sense as a pragma() than an
attribute unto itself, though.
-- Chris N-S
    
    
More information about the Digitalmars-d
mailing list