Am Mon, 17 Mar 2014 20:10:31 +0100
schrieb Rainer Schuetze <[email protected]>:
> > 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