浅墨浓香

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

导航

2020年4月16日

摘要: 3.4 Template Parameter Type auto 3.4 模板参数类型auto Since C++17, you can define a nontype template parameter to generically accept any type that is allowe 阅读全文

posted @ 2020-04-16 22:53 浅墨浓香 阅读(318) 评论(0) 推荐(0) 编辑

摘要: 3.3 Restrictions for Nontype Template Parameters 3.3 非类型模板参数的限制 Note that nontype template parameters carry some restrictions. In general, they can be 阅读全文

posted @ 2020-04-16 22:47 浅墨浓香 阅读(517) 评论(0) 推荐(0) 编辑

摘要: 3.2 Nontype Function Template Parameters 3.2 非类型函数模板参数 You can also define nontype parameters for function templates. For example, the following funct 阅读全文

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

摘要: Chapter 3: Nontype Template Parameters 第3章 非类型模板参数 For function and class templates, template parameters don’t have to be types. They can also be ordi 阅读全文

posted @ 2020-04-16 10:18 浅墨浓香 阅读(295) 评论(0) 推荐(0) 编辑

摘要: 2.11 Summary 2.11 小结 • A class template is a class that is implemented with one or more type parameters left open. 类模板是具有如下性质的类:在类的实现中,可以有一个或多个类型参数还没有 阅读全文

posted @ 2020-04-16 00:38 浅墨浓香 阅读(198) 评论(0) 推荐(0) 编辑

摘要: 2.10 Templatized Aggregates 2.10 模板化聚合类 Aggregate classes (classes/structs with no user-provided, explicit, or inherited constructors, no private or p 阅读全文

posted @ 2020-04-16 00:36 浅墨浓香 阅读(276) 评论(0) 推荐(0) 编辑