On Fri, 17 Feb 2006 11:06:05 GMT, Kobe <> wrote:
>Is there any difference in:
>
>template <class T>
>
>vs.
>
>template <typename T>
>
>?
>
>Thanks,
>K
There is no difference except for the fact that using "class T" in the
above declaration might be somewhat misleading, since any type,
including non-class types such as int, can be used to instantiate the
template.
There are certain corner cases when writing template template
parameters where the keyword "class" must be used. Josuttis and
Vandevoorde give such an example on page 51 of their book "C++
Templates, The Complete Guide".
--
Bob Hairgrove