-- below...
--
Reginald Blue | Opinions expressed here do not
Natural Language Understanding | necessarily represent those of
Unisys Corporation | my employer.
--------------------------------+-------------------------------
NL technology,speech application| My email address is wrong, you
development training, see: | need to remove the obvious.
http://www.speechdepot.com/ +-------------------------------
Quote:
> So for B to inherit from A would go like:
> class B : public A<int>
> and instead of passing a primitive data type if I passed into A a templet
> class C This is what it would look like
> class B : public A<C<int>>
> to the extream would be to change int to class D and then we would have
> classB : public A<C<D>>
> Do I have this figured out or am I still off a bit?
-- No, that's pretty much it. There are two things however:
1. Amazingly, that last example could be:
class B : public A<C<B> >
and it would actually work. How the compiler actually figures that out
eludes me, but...
2. Don't do:
class B : public A<C<int>>
do
class B : public A<C<int> >
(note the extra space there between the two '>')
Reason? The C++ parser interprets ">>" as a shift operator instead of as if
it were two of ">" those.