Recursive Templates
BCS
ao at pathlink.com
Tue Jul 29 12:36:08 PDT 2008
Reply to llee,
> I ran into a similar problem when working with sets. I could define
> sets using templates, but I couldn't define sets of sets without the
> compiler complaining about recursive definitions.
>
> For example:
> class Set (T) { T[] elems; ... }
> but how would I define a set of sets?.
that might be a good thing
sets of sets = strange things: http://en.wikipedia.org/wiki/Russell's_paradox
>
> Set! (Set) family = ... does not work.
>
More information about the Digitalmars-d
mailing list