ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 7.模板与泛型编程 Templates and Generic Programming. 模板元编程(template metaprogramming): 在 C++ 编译器内执行并于编译完成时停止执行的程序。 [条款41:了解隐式接口和编译期多态](/chapter7/section41.md) [条款42:了解 typename 的双重含义](/chapter7/section42.md) [条款43:学习处理模板化基类内的名称](/chapter7/section43.md) [条款44:将与参数无关的代码抽离 templates](/chapter7/section44.md) [条款45:运用成员函数模板接收所有兼容类型](/chapter7/section45.md) [条款46:需要类型转换时请为模板定义非成员函数](/chapter7/section46.md) [条款47:请使用 traits classes 表现类型信息](/chapter7/section47.md) [条款48:认识 template 元编程](/chapter7/section48.md)