> All generics do is add (fairly limited) compile-time type checking.
> Among the things they _don't_ do is specialization, nesting,
> metaprogramming, and about any other feature of c++ templates
> you can think of.
Twisted sez:
>> All generics do is add (fairly limited) compile-time type checking.
>> Among the things they _don't_ do is specialization, nesting,
>> metaprogramming, and about any other feature of c++ templates
>> you can think of.
>
> Considering all I'm trying to add is some compile-time type checking...
That's where "fairly limited" bit comes in. Basically, if
you want to limit the element to a specific type, you use
regular types (as in
... MyVector add( MyVector y )
). If you want the element to be "anything, but all of the
same type", you use
... T add( T y )
In other words, there's usually little point in writing generic
containers for a particular application.
Dima

Signature
Sufficiently advanced incompetence is indistinguishable from malice.