Wrapper around a recursive data type

user1234 user1234 at 12.de
Mon Jul 8 13:29:05 UTC 2024


On Monday, 8 July 2024 at 08:56:51 UTC, drug007 wrote:
> I need to generate some meta info of my data types. I do it 
> this [...]
> How can I "break" this recursion or some other work around to 
> fix it?

Use `Node*[]` for the children type. That way the compiler knows 
the size of the (previously) problematic member. In other words, 
instead of the need to know `Node` size, the compiler will not 
look further, it's a pointer.


More information about the Digitalmars-d-learn mailing list