ProgrammingLang/c++
[C++]Template
jinkwon.kim
2022. 6. 21. 10:52
728x90
반응형
1. 사용이유
- Code Reuse
2. STL은 generic 하게 되어있다.
3. alias template
- using을 사용한다.
4. variable template
5. lambda template(C++20)
6. Template fundermetal
- class type = class, struct , union
- template가 될수 이쓴 곳
7. Translation Unint
- Code 생성 시점 : 컴파일 단계에서생성된다. Object Code 생성전.
8. Declarations and definitions
10. forward Declarations
11. One-Definitino Rule (ODR)
12. inline은 사용하는 모든 곳에서 정의가 있어야 하낟.
13. template는 하나의 헤더파일에서 선언 및 정의가 존재 해야 한다.
14. 용어 설명
15. template parameter 종류
- type parameter
- 상수 template
- template에서 template을 사용
16. default template arguments
17. Template specializtion
18. template instantiation and template specializtion?
19. implicit instantiation
20. implicit instantitation은 데이터만 생성되지 함수가 생성되지 않는다.
21. Explicit instantiation 은 모든 코드가 생성된다.
22. 특정 function만 explicit instantiation 하고싶다.
23. explicit instantiation에 대해서는 개발자가 ODR을 책임져야한다.
24. 정리.
25. Explicit Specialization
26 최종 관계
728x90
반응형