浅墨浓香

想要天亮进城,就得天黑赶路。

导航

2020年4月14日

摘要: Chapter 2: Class Templates 第2章 类模板 Similar to functions, classes can also be parameterized with one or more types. Container classes, which are used t 阅读全文

posted @ 2020-04-14 11:33 浅墨浓香 阅读(491) 评论(0) 推荐(0) 编辑

摘要: 1.6 But, Shouldn’t We …? 1.6 但是,难道我们不应该…? Probably, even these simple function template examples might raise further questions. Three questions are pr 阅读全文

posted @ 2020-04-14 11:21 浅墨浓香 阅读(326) 评论(0) 推荐(0) 编辑

摘要: 1.5 Overloading Function Templates 1.5 重载函数模板 Like ordinary functions, function templates can be overloaded. That is, you can have different function 阅读全文

posted @ 2020-04-14 11:16 浅墨浓香 阅读(484) 评论(0) 推荐(1) 编辑

摘要: 1.4 Default Template Arguments 1.4 默认模板参数 You can also define default values for template parameters. These values are called default template argumen 阅读全文

posted @ 2020-04-14 11:07 浅墨浓香 阅读(407) 评论(0) 推荐(0) 编辑

摘要: 1.3 Multiple Template Parameters 1.3 多模板参数 As we have seen so far, function templates have two distinct sets of parameters: 到目前为止,我们己经看到函数模板具有两组不同的参数: 阅读全文

posted @ 2020-04-14 11:01 浅墨浓香 阅读(1147) 评论(0) 推荐(0) 编辑

摘要: 1.2 Template Argument Deduction 1.2 模板参数的推导 When we call a function template such as max() for some arguments, the template parameters are determined 阅读全文

posted @ 2020-04-14 10:53 浅墨浓香 阅读(648) 评论(0) 推荐(2) 编辑

摘要: Chapter 1: Function Templates 第1章 函数模板 This chapter introduces function templates. Function templates are functions that are parameterized so that the 阅读全文

posted @ 2020-04-14 10:47 浅墨浓香 阅读(756) 评论(0) 推荐(1) 编辑