Is it possible to store different generic types in ex. an
Is it possible to store different generic types? via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Nov 9 07:44:59 PST 2016
Is it possible to store different generic types in ex. somekind
of container such as an array, hashtable etc.
Let's say we got
class Foo(T) {
...
}
Would it be possible to store something like
Foo[] foos; // Where Foo of course should allow any generic
version of Foo
Ex.
Foo!int and Foo!string should both be able to be stored inside
the array.
If so how would one construct an array like that or is there some
other container that may be able to do it?
More information about the Digitalmars-d-learn
mailing list