std.container.array: Error: unable to determine fields of Test because of forward references

Tobias Pankrath tobias at pankrath.net
Thu Oct 31 13:22:41 UTC 2019


On Thursday, 31 October 2019 at 12:37:55 UTC, user1234 wrote:
> struct S
> {
>      S*[] children;
> }
>
> because otherwise when you declare the array the compiler has 
> not finished the semantic ana of S.

---
struct Test
{
     Test[] t;
}
---

Works today. Putting pointers into the container (and thus having 
another indirection) is not an option, though.


More information about the Digitalmars-d-learn mailing list