can not take const struct member address at CTFE , is this a bug?
test123
test123 at gmail.com
Wed Sep 14 04:53:26 UTC 2022
On Wednesday, 14 September 2022 at 00:40:38 UTC, Ruby The
Roobster wrote:
> The addresses of items stored in memory are by definition not
> constant. This isn't a bug.
If so why this can work ?
```d
struct c { uint a, b;}
__gshared const c d = { 3, 4};
__gshared const e = & d;
```
the `e` can get address of `d`, then it should be to get address
of `d.a`
More information about the Digitalmars-d-learn
mailing list