On 19/02/2019 6:26 AM, DanielG wrote:
In the meantime, while I'm waiting for this bug to be noticed by anybody with the skills to address it, what would be the most elegant way of working around it?

Obviously I could do a:

version(Windows) {
   export extern __gshared ...
} else {
   extern __gshared ...
}

But what's the minimal way of toggling the presence of "export" in a declaration? Using mixins feels kind of gross for this, but if that's the only option ...

Almost makes me long for the C preprocessor :P

Because you need two different versions to choose between them, either set a per module version or use static if with enum's.

But yeah, I would do that. Of course a mixin template with a code string (q{ ... }) would be cleaner. After all, ``export { mixin(str); }`` would work well.

Reply via email to