|
From: Gerhard Menzl on 14 Jan 2008 21:04 gourav.panda89(a)yahoo.co.in wrote: > what is the difference betweeen class template and template class? Both are normally used in the same sense, even in the C++ Standard. Personally, I find "template class", just like "template function", misleading. A template by itself can never be a class or a function, only its instantiations can. Therefore I prefer the terms "class template" and "function template". -- Gerhard Menzl Non-spammers may respond to my email address, which is composed of my full name, separated by a dot, followed by at, followed by "fwz", followed by a dot, followed by "aero". [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: Alberto Ganesh Barbati on 15 Jan 2008 04:40 Gerhard Menzl ha scritto: > gourav.panda89(a)yahoo.co.in wrote: > >> what is the difference betweeen class template and template class? > > Both are normally used in the same sense, even in the C++ Standard. That is not entirely correct. The term "template class" was indeed present in C++98, but was banned and consistently removed from C++03. > Personally, I find "template class", just like "template function", > misleading. A template by itself can never be a class or a function, > only its instantiations can. Therefore I prefer the terms "class > template" and "function template". That's the reasons why it was banned. Actually some people interpreted "template class" with the meaning "specialization of a class template", so even more than misleading, the term was becoming ambiguous. Ganesh -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
|
Pages: 1 Prev: template function ambiguity Next: Optimizing away copy constructors |