(ref.doc)template terms

Next template advantages Up: cppR 5/2

Template terminology
by James Coggins, in cppR 5/2

Useful but controversical terminology definitions (contradictions with
Note:
 ARM):

- template declaration
  announces the existence, but not necessarily the contents, e.g.:
	template <class T> class stack;

- template definition
  specifies the members of a class template or the body of a function
  template, e.g.:
	template <class T> class stack {
	public:
		void push(const T&);
		//...
	};

- template member function definition
  used to define the members of a class template, e.g.:
	template <class T>
		void stack<T>::push(const T& val)
	{
		data[++top] = val;
	}

- specialization
  the user has the compiler do a specialized version, e.g.:
	extern stack<int> siv;

- user specialization
  the programmer wants a specialized version of a template for a given
  type, e.g.:
	class stack<char> {
	public:
		//...
	};

- instantiation
  the process of generating code needed to implement the particular
  template specializations the programmer needs


automatically generated by info2www version 1.2.2.8