Final by default?
Marco Leise
Marco.Leise at gmx.de
Mon Mar 17 18:15:45 PDT 2014
Am Mon, 17 Mar 2014 20:10:31 +0100
schrieb Rainer Schuetze <r.sagitario at gmx.de>:
> > In that specific case, why does this not work for you?:
> >
> > nothrow extern(Windows) {
> > HANDLE GetCurrentProcess();
> > }
> >
>
> The attributes sometimes need to be selected conditionally, e.g. when
> building a library for static or dynamic linkage (at least on windows
> where not everything is exported by default). Right now, you don't have
> an alternative to code duplication or heavy use of string mixins.
Can we write this? It just came to my mind:
enum attribs = "nothrow extern(C):";
{
mixin(attribs);
HANDLE GetCurrentProcess();
}
--
Marco
More information about the Digitalmars-d
mailing list