COMP345 - Advanced Program Design with C++ - slide set 11- part 1 of 1 - templates

preview_player
Показать описание
This video is for the course COMP345 (Advanced Program Design with C++) section D taught in the fall semester of 2020 at Concordia University, Montreal , Canada. It presents slide set #10, which introduces various concepts related to the use of templates.
Рекомендации по теме
Комментарии
Автор

1:00 Emphasizing the difference between Java Generics and C++ Templates
2:40 What is Metaprogramming?
5:50 History of Metaprogramming
9:25 What is Template Metaprogramming?
15:55 Showing that C++ is a hybrid language (both a template language and a C++ language)
16:30 What's the goal behind templates?
18:13 The compilation process, an important difference between Java generics and C++ templates
25:00 problem: the max() function
27:30 solution: the max() function
30:15 Class template examples
36:55 Template operator example
37:20 Example of implementing smart pointers using template Metaprogramming (1)
45:15 Example of implementing smart pointers using template Metaprogramming (2) [Example seems pretty complicated I find...]
56:55 Limitation of templates
59:10 A solution to this limitation: Template specialization
1:01:15 Another example of explicit template specialization
1:02:22 Pitfalls of C++ templates (static data members and local variables)
1:05:55 Greatest pitfall of C++ (Templates vs Compilation Units)
1:13:00 Solutions to this pitfall (Templates vs Compilation Units)
1:19:00 C++ Templates vs Java Generics comparison
1:25:25 Impact of C++ templates

ArielVolovik
welcome to shbcf.ru