CTFE limitation on reinterpreting cast

Kapendev alexandroskapretsos at gmail.com
Tue Sep 29 19:07:29 UTC 2026


On Monday, 28 September 2026 at 22:50:21 UTC, Rambutan wrote:
> Without the cast the initializer &Bobj is fine, but with it 
> this does not compile.

Not what you want, but here:

```d
C* ptr() => cast(C*) &Bobj;

void main() {
     ptr.thingInC += 69;
}
```



More information about the Digitalmars-d mailing list