全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Function template, class template, template parameter?

又称: template (C++) · template parameter · function template · class template

Definition 4.1 University Computer Science — Year 2 · 第 4 章 — Templates and Generic Programming

A template is a declaration preceded by template <typename T, ...>, whose template parameters stand for types (typename T) or for constant values (such as std::size_t N). A function template describes a family of functions, a class template a family of classes, one member of the family for each choice of the parameters.

在原文中阅读 →