Recursive Templates

llee llee at goucher.edu
Tue Jul 29 12:13:36 PDT 2008


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?.

     Set! (Set) family = ... does not work.



More information about the Digitalmars-d mailing list