Skip to content

Commit 5a89b38

Browse files
committed
add note
1 parent 5b8c4ed commit 5a89b38

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

_code/CppCon/2022/back_to_basics_object-oriented_programming_in_c++.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,27 @@ data members: should be private and need to initialized for primitive types.
2222
member functions is not part of the object size
2323

2424
a function defined in class is inline.
25+
26+
Constructor Delegation and Constructor Inheritance
27+
28+
Casting and explicit
29+
30+
mutable members
31+
32+
Rule of Zero: It is the best if your class doesn't need any resource management: try to using std::unique_ptr and std::shared_ptr, Isolate the resource to it's own class.
33+
34+
Rule of There: if you need a dectrctor, first thing block the copy Constructor and assignment operator.
35+
36+
Rule of Five: If you implement or block any one of the five, you lose the defaults for the move operations.
37+
38+
Inheritance-Polymorphism
39+
40+
Command Pattern
41+
42+
> C++ is not Just an Object Oriented Language
43+
44+
Array of Structs vs Structs of Arrays
45+
46+
Efficient
47+
48+
ref: Inheritance is the base class of Evil by Sean Parent

_code/cpp/better_code_runtime_polymorphism.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ sink argument
5050

5151
guidelines: Polymorphism is an implementation detail.
5252

53-
ref:http://sean-parent.stlab.cc/papers-adn-presentations
53+
ref: [website](http://sean-parent.stlab.cc/papers-adn-presentations)
5454

5555
ref: Elements of Programming
56-

0 commit comments

Comments
 (0)