You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cpp/cpp5/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## ruleof5.cpp
4
4
5
-
[Video](https://youtu.be/dbc7HAcMD4c)
5
+
[Video](https://youtu.be/dbc7HAcMD4c) (20:07)
6
6
*Demonstrates in which situations the constructor, destructor, copy assignment operator, move constructor, and move assignment operator methods get called."
7
7
8
8
The purpose of this video is to demonstrate *when* the methods get called, **not how to write the methods**. Note that in practice you would only want to write these methods if necessary (Rule of 5). The class we start with technically doesn't need any of these methods (Rule of Zero).
@@ -11,31 +11,31 @@ NOTE: After the video was completed I updated the source to add an `explicit` mo
11
11
12
12
## smartptr1.cpp
13
13
14
-
[Video](https://youtu.be/odTiBLk09DA)
14
+
[Video](https://youtu.be/odTiBLk09DA) (11:28)
15
15
*Introduction to smart pointers in C++ - declaring and working with shared_ptr & unique_ptr*
16
16
17
17
In general, unique_ptr is preferred since shared_ptr may not free resources if there are pointers still holding the resource.
18
18
19
19
## smartptr2.cpp
20
20
21
-
[Video](https://youtu.be/2RMhCQn2qOY)
21
+
[Video](https://youtu.be/2RMhCQn2qOY) (4:14)
22
22
*Demonstration of unique_ptr to an object with a destructor*
23
23
24
24
## exceptions.cpp
25
25
26
-
[Video](https://youtu.be/uV7VrfDd33o)
26
+
[Video](https://youtu.be/uV7VrfDd33o) (9:28)
27
27
*Example of C++ exceptions*
28
28
29
29
## constintptr.cpp
30
30
31
-
[Video](https://youtu.be/0Xo18Ozh09Q)
31
+
[Video](https://youtu.be/0Xo18Ozh09Q) (5:29)
32
32
*Demonstration of allocating constant pointers in differnt ways*
0 commit comments