1. Make a wrapper class. Now you can store Object[], or you can make a3. Use an union. However, only do this if you always know from outside what type of data is stored in each node. If you need to memoize the type of data for each node, better resort to 1. or 2.base class or base interface and use that.2. Use Variant, which can wrap anything, or the related Algebraic, whichcan wrap a fixed collection of types.
On Thursday, 17 January 2019 at 02:27:20 UTC, Neia Neutuladh
wrote:
- Runtime heterogeneous collect... Steven O via Digitalmars-d-learn
- Re: Runtime heterogeneou... Neia Neutuladh via Digitalmars-d-learn
- Re: Runtime heteroge... Dukc via Digitalmars-d-learn
- Re: Runtime hete... Jonathan M Davis via Digitalmars-d-learn
- Re: Runtime hete... Steven Schveighoffer via Digitalmars-d-learn
- Re: Runtime ... Alex via Digitalmars-d-learn
- Re: Run... Steven Schveighoffer via Digitalmars-d-learn
- Re: Runtime heteroge... Seb via Digitalmars-d-learn
- Re: Runtime hete... Steven O via Digitalmars-d-learn
- Re: Runtime heterogeneou... Kagamin via Digitalmars-d-learn