array of elements of various subclasses
Jesse Phillips
jessekphillips+D at gmail.com
Sun Nov 7 08:24:37 PST 2010
spir Wrote:
> On Sun, 7 Nov 2010 16:17:38 +0100
> spir <denis.spir at gmail.com> wrote:
>
> And I'd like to know, as a possible workaround, if there is a way to save a variadic arg list:
> class C {
> ??? xs;
> this(X xs...) {
> this.xs = xs;
> }
> }
>
> Denis
> -- -- -- -- -- -- --
> vit esse estrany â£
>
> spir.wikidot.com
>
You it is a typed variadic list (as shown above) it is just an array of that type so you should be able to save it to an X[]. If you are using the unsafe version then, no.
More information about the Digitalmars-d-learn
mailing list