Instantiation of nested structs should be allowed outside their parent scope
Stanislav Blinov
stanislav.blinov at gmail.com
Mon Nov 8 01:02:11 UTC 2021
Just make it `@system`, and even then ONLY if something is
actually getting instantiated and it's not just a CTFE test.
Unless I'm missing something, that should be the behavior. The
'cannot access frame pointer' blah SO needs to go away...
Rationale: instantiating things is super useful for compile time
tests and inference. Nested structs complicate that to wazoo with
that failure.
If you're not convinced, I encourage you to try and define e.g.
```d
enum bool isNothrowCopyable(To, From) = /* ??? */
```
without reimplementing copy initialization by hand. It should be
a trivial test. Just test copy-initialization of a union field.
But no. Not when nested structs are involved. And they can get
involved indirectly.
More information about the Digitalmars-d
mailing list