1ms Faster
Home
  • Program

    • Lean in C++
  • Perfromance Engineering

    • [>>>>>]
  • Reading Note

    • [>>>>>]
  • ComputeArch

    • [_]
  • Compiler

    • [_]
  • System

    • [_]
Authoring
  • Categories
  • Tags
GitHub (opens new window)

Quincy Jet

We are.
Home
  • Program

    • Lean in C++
  • Perfromance Engineering

    • [>>>>>]
  • Reading Note

    • [>>>>>]
  • ComputeArch

    • [_]
  • Compiler

    • [_]
  • System

    • [_]
Authoring
  • Categories
  • Tags
GitHub (opens new window)
  • Lean in c++

  • Performance Engineering

  • Misc

  • Reading Notes

    • Effective C++

      • 习惯C++
      • 构造,析构, 和重载赋值运算符
      • 资源管理
      • 设计与声明
      • 实现Implementations
      • 继承与OOP
      • 模板,Templates and GP
        • 模板,Templates and GP
          • Item 41:了解隐式接口和编译期多态 Understand implicit interfaces and compile-time polymorphism.
          • Item 42:了解typename的双重意义 Understand the two meanings of typename.
          • Item 43:学习处理模板化基类内的名称 Know how to access names in templatized base classes.
          • Item 44:将与参数无关的代码抽离templates Factor parameter-independent code out of templates.
          • Item 45:运用成员函数模板接受所有兼容类型 Use member function templates to accept"all compatible types."
          • Item 46:需要类型转换时请为模板定义非成员函数 Define non-member functions inside templates when type conversions are desired.
          • Item 47:请使用traits classes表现类型信息 Use traits classes for information about types.
          • Item 48:认识template元编程 Be aware of template metaprogramming.
      • 定制new和delete
      • 杂项, Misc
    • More Effective C++

    • 《C++ 性能优化指南》
  • Wiki
  • Reading Notes
  • Effective C++
Quincy Jet
2022-06-27
Content

模板,Templates and GP

# 模板,Templates and GP

# Item 41:了解隐式接口和编译期多态 Understand implicit interfaces and compile-time polymorphism.

  1. 隐式接口和编译期多态(和RTTI的区别?)

# Item 42:了解typename的双重意义 Understand the two meanings of typename.

  1. typename和class关键字, typename关键字的双重定义

# Item 43:学习处理模板化基类内的名称 Know how to access names in templatized base classes.

  1. 如何处理模板化基类的里面的名称

# Item 44:将与参数无关的代码抽离templates Factor parameter-independent code out of templates.

  1. 参数无关的代码, 抽离template

# Item 45:运用成员函数模板接受所有兼容类型 Use member function templates to accept"all compatible types."

  1. 使用成员函数模板来接受所有兼容的类型

# Item 46:需要类型转换时请为模板定义非成员函数 Define non-member functions inside templates when type conversions are desired.

  1. 需要类型转换的时候, 为模板定义一个非成员函数

# Item 47:请使用traits classes表现类型信息 Use traits classes for information about types.

  1. 使用traits来表现模板里面的类型信息

# Item 48:认识template元编程 Be aware of template metaprogramming.

  1. 什么是template元编程
继承与OOP
定制new和delete

← 继承与OOP 定制new和delete→

Copyright © 2017-2023 Quincy Jet | MIT License
  • Auto
  • Light
  • Dark
  • Read