Is the following C ++ code correct? And if so, can someone point me to a clause in the standard that mentions this? It seems that you can use the template name instead of the template identifier in the area enclosed in the template, and the compiler automatically adds a list of template arguments.
template<class Type> class Mana { public: Mana(const Mana& m) {} Mana() {} };
Unlike:
template<class Type> class Mana { public: Mana(const Mana<Type>& m) {} Mana() {} };
The code compiles with g ++, as well as in the MS visual studio.
source share