Is the following C++ code correct? And if so, could anybody point me to a paragraph in the standard that mentions this? It seems that one can use template-name instead of template-id in a scope enclosed with template and the compiler automatically adds the template argument list.
template<class Type>
class Mana {
public:
Mana(const Mana& m) {/*...*/}
Mana() {/*...*/}
};
as opposed to:
template<class Type>
class Mana {
public:
Mana(const Mana<Type>& m) {/*...*/}
Mana() {/*...*/}
};
The code compiles with g++ as well as in MS visual studio.
Mana
is equivalent toMana<Type>
. For quote from standard, we need to wait.