Advanced Templates

作者
Marc Gregoire
标识
DOI:10.1002/9781394193202.ch26
摘要

There are three kinds of template parameters: template type parameters, non-type template parameters, and template template parameters. The const char* class specialization of the Grid class template is called a full class template specialization because it specializes the Grid template for every template parameter. The C++ standard does not permit partial template specialization of function templates. Templates in C++ provide capabilities that go far beyond the simple class and function templates. One of these capabilities is template recursion. Template recursion is similar to function recursion, in which a function is defined in terms of calling itself with a slightly easier version of the problem. The chapter first provides a motivation for template recursion and then shows how to implement it. Variadic templates can take a variable number of template parameters. The chapter also touches on template metaprogramming.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
默阳完成签到,获得积分10
刚刚
小新小新发布了新的文献求助10
刚刚
Hello应助小鱼采纳,获得10
刚刚
长卿完成签到,获得积分10
1秒前
Orange应助毗昙采纳,获得10
1秒前
邱清发布了新的文献求助10
1秒前
1秒前
科目三应助昏睡的凝雁采纳,获得10
2秒前
橘子发布了新的文献求助10
2秒前
好运小陈发布了新的文献求助10
2秒前
林一木完成签到,获得积分10
4秒前
370086320完成签到,获得积分10
4秒前
wenjinchi完成签到 ,获得积分10
4秒前
6秒前
7秒前
宋艳芳完成签到,获得积分10
8秒前
8秒前
8秒前
杨咩咩发布了新的文献求助10
9秒前
10秒前
10秒前
在水一方应助江子川采纳,获得10
11秒前
ming2026应助江子川采纳,获得10
11秒前
李健的小迷弟应助江子川采纳,获得10
11秒前
v0id应助江子川采纳,获得10
11秒前
科研通AI6.4应助江子川采纳,获得10
11秒前
Oscar完成签到,获得积分10
11秒前
科目三应助科研劝退采纳,获得10
12秒前
小目标完成签到,获得积分10
12秒前
12秒前
14秒前
向芝林完成签到,获得积分10
15秒前
Jessica英语好完成签到,获得积分10
15秒前
zzz发布了新的文献求助10
15秒前
16秒前
上官若男应助橘子采纳,获得10
16秒前
彭于晏应助好运小陈采纳,获得10
16秒前
16秒前
研友小福应助sdnumakabazi采纳,获得10
18秒前
小鱼发布了新的文献求助10
18秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
An Introduction to Foreign Language Learning and Teaching 750
China Pluperfect I: Epistemology of Past and Outside in Chinese Art 520
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
The fast track to determining transfer functions of linear circuits: The student guide 500
The Analytical and Numerical Solution of Electric and Magnetic Fields 500
Synthesis of P-Chiral Phosphine Ligands and Their Applications in Asymmetric Catalysis 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7621833
求助须知:如何正确求助?哪些是违规求助? 9197128
关于积分的说明 19714182
捐赠科研通 7193398
什么是DOI,文献DOI怎么找? 3272878
关于科研通互助平台的介绍 2435331
邀请新用户注册赠送积分活动 2268126