Final by default?

Walter Bright newshound2 at digitalmars.com
Sun Mar 16 18:20:37 PDT 2014


On 3/15/2014 6:44 AM, Johannes Pfau wrote:
> Then in cairo.d
> version(CAIRO_HAS_PNG_SUPPORT)
> {
>     extern(C) int cairo_save_png(char* x);
>     void savePNG(string x){cairo_save_png(toStringz(x))};
> }

try adding:

   else
   {
        void savePNG(string x) { }
   }

and then your users can just call savePNG without checking the version.


More information about the Digitalmars-d mailing list