Thread overview
(How) can reflection recoginzie `extern` variables?
October 11
```d
extern int x;
/****/ int y;
```

(How) can I get the information that `x` is `extern` and `y` is not? There seems to be no `__traits` for it.
October 11

On Friday, 11 October 2024 at 16:33:55 UTC, Quirin Schroll wrote:

>
extern int x;
/****/ int y;

(How) can I get the information that x is extern and y is not? There seems to be no __traits for it.

There is no __traits mechanism to directly determine whether a symbol is extern. However, the extern linkage is determined at compile time based on how the symbol is defined, and the type of linkage it uses is determined by the compiler.

SDB@79

October 11

On Friday, 11 October 2024 at 17:58:00 UTC, Salih Dincer wrote:

>

There is no __traits mechanism to directly determine ...

extern int x;
int y;

pragma(msg, __traits(isSame, y, x));

I tried it now, but as I said, it wouldn't be unreasonable:

SDB@79