Skip to content

zzuse/modernCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Repo includes modern CPP experiments of courses:

  • Complete Modern C++ (C++11/14/17) -- udemy
  • Modern C++ Concurrency in Depth(C++17/20) -- udemy
  • 现代 C++ 编程实战 -- time.geekbang.org

Complete Modern C++ (C++11/14/17) Chapter

CopyCtor/
chapter 55. Move Semantics - Implementation (C++11) -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 56. Rule of 5 & 0 -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 64. Operator Overloading - Part V (Smart Pointer Basics) -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 67. Type Conversions - Part I (Basics) -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 70. Type Conversions - Part IV (User Defined to User Defined) -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
MemoryManage/
chapter 72. Raw Pointers -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 73. std::unique_ptr -- commit fcb983c5e6c4001baf00b7caa8acae81fc95508c
chapter 74. Sharing Pointers -- commit d0918c38e18b42235723c06ad0c8ba9f66377c4a
chapter 76. std::shared_ptr -- commit 97b68c394aff49962d79c2c50241634f66eb10de
chapter 78. std::weak_ptr internals -- commit 95295575864b876e8ad1b1edcf200524548a0946
chapter 79. Circular Reference -- commit 6579cfdab599f873b6ee3c04bbd5fd103a621d90
chapter 80. Deleter -- commit 53cd72d605f8b1ba1938ac2e1d10c65396d0d454
chapter 81. Dynamic Arrarys -- commit a271f46a2afa230fdad7f4b9dc25616908f9d586
chapter 82. Make Functions -- commit ffc984fbececf7c53beea3db678bf02fa689a6a0
Goodies/
chapter 84. Enums -- commit 2cbe039d7269a89208351190d777468dfc0ed831
chapter 86. String: literals -- commit 75f35ffa8672eb75ffc20a45738d9e2225c8e2ac
chapter 88. String Streams -- commit 75f35ffa8672eb75ffc20a45738d9e2225c8e2ac
chapter 89. Assignment II tolower -- commit 75f35ffa8672eb75ffc20a45738d9e2225c8e2ac
chapter 90. User-Defined Literals -- commit 75f35ffa8672eb75ffc20a45738d9e2225c8e2ac
chapter 92. std::initializer_list (C++11) -- commit 75f35ffa8672eb75ffc20a45738d9e2225c8e2ac
chapter 96. Union -- commit 78106abc1d2f4e9604b31ddad2891258ca9c91d8
OOP/
chapter 98. Inheritance basic -- commit 875fb778cfdce39bd884bee383d467c8054dbe25
chapter 101. Account and Savings -- commit 9884d381ec0d3a4893424a0c91f2adbc0332a3be
chapter 104. Inheriting Constructors -- commit 5c342dff6b70fad57b9c3513b6e119c655fb2782
chapter 105. Virtual Keyword -- commit 3efeb739ab5fee3559b300e5789141725c07eff1
chapter 107. Virtual Destructor -- commit 5785e0f7f44874d7e412065566f85eb0b426ec4c
chapter 108. override and final -- commit 035ee54006555ecf182c717c11fd4c918a57a057
chapter 109. Object Slicing upcast and downcast -- commit 15e5e9fdfe0e2d032d0f6ed77a87452eec76bcbf
chapter 111. Dynamic_cast -- commit 1fccc8e7af216528fb5f0e4c154e4542b31c1ffb
chapter 112. Abstract class -- commit 6669e5e22ecf9b058ea0ea746ee67a479d4148eb
chapter 113. Multiple Inheritance -- commit bb635753fab5c304d483434e262598cc6ffa6774
Exception/
chapter 114. Exception Handling basic -- commit 6f678eaa1b81617a26c3f9d042607c797b899b8a
chapter 116. Exception Stack Unwinding -- commit 103699b54b7f4a885bfc989d1dd8745b94656adb
chapter 117. Exception Nested -- commit 859a8c01cfad764dab22a2e647f0249a190bb711
chapter 118. Exception Constructor and Destructor -- commit c3feaf77197c9336c05912cbb863b71c605d219e
chapter 119. Exception noexcept -- commit 7903ebc65b9dd574033987cf684a58fee1635dfa
FileIO/
chapter 125. File IO - Part IV Character IO -- commit b06879645ebaa641ce5c7b501344c20725e12756
chapter 126. File IO - Part V (Binary IO) -- commit b06879645ebaa641ce5c7b501344c20725e12756
chapter 127. Assignment I Copy Utility -- commit 2649f342dcf6c42695005096d7d57a4a182d464e
Template/
chapter 132. List processing using Template -- commit 5945f5e979c784b513f35543269dbd849f6c6ab6
chapter 133. Template Argument Deduction & Instantiation -- commit 400c7b92cc4f1c9325cb4fd73c18cba975ad1ed1
chapter 135. Template Explicit Specialization -- commit 9b8386a7275bfcc2e5fb79c33c144e157c76ea43
chapter 136. Non Type Template Arg -- commit 9cf93bc9c65c29c9897d401a52741ca481a63298
chapter 138. Perfect Forwarding 1 -- commit 4c4714b9bb3a30fd57d7667b1f172fd50e7d831e
chapter 139. Perfect Forwarding 2 -- commit e559b09e1053a2fb2fffff8ca6e778e8898477d1
chapter 141. Variadic Templates (C++11) -- commit 1e448ca65f89cc7ea45089aae2279c0b210f6d5b
chapter 142. Assignment (Integer Revise) --  commit f34d669ae37b53e292cab182375319b505f93412
chapter 142. CreateObject Factory -- commit d5dd4696c688e3e9ac70f73c50dcdbf448bc326c
chapter 143. Class Templates (Int Stack Implement) -- commit 1b033fdaa436436ec504cd161b0c94cb00d3ea29
chapter 143. Class Templates (Template Stack Implement) -- commit 6a7694578dcaf80bd72ec224c29c4664f9c31c2a
chapter 144. Class Templates (Explicit Specialization) -- commit 21460cfedb1771c94b8a8b8c02ba510c430dac12
chapter 145. Class Templates (Explicit Partial Specialization) -- commit 0e0dc1eebd3a36abc2da13ed156911e6a1875b64
chapter 147. Class Template Partial Specialization -- commit f80b9e96049913067dbdc65d05d8530183f0c1ad
chapter 148. Typedef, Type Alias & Alias Template -- commit 47b329037a9d551fef88bd3f85be36b86aa3a7bb
chapter 149. Type Traits (C++11) -- commit b9ed465e6b9dbb0354d53c2fd6d525c55545e830
chapter 150. static_assert -- commit f6c11aab7c2962e5a06ab23cb5dd60b8ef5c9111
Lambda/
chapter 152. Callbacks Revisited (Sort Basic) -- commit 0b84800250191de4ac4220ace07b7b782d5a724e
chapter 152. Callbacks Revisited (Sort Function pointer) -- commit 0cfde9a2fe627967ebc150ed0534678a09d72fd9
chapter 152. Callbacks Revisited (Sort move sementic) -- commit 4839d06976e073cfbb98d7e3c56a018e7f00276c
chapter 153. Callbacks Function Objects -- commit 6ffb6d1e06c2ce0103e627f528d53561bcb17726
chapter 154. Lambda Expressions -- commit 94e51c08877270a2d99f3ce3335a4e8b9df21ba5
chapter 155. Lambda Expressions - Internals -- commit 956b4134ab9bc949d2388adfbc39ab9c2cbee708
chapter 156. Lambda Expressions - Capture List I -- commit daaf13db4a32a64ed7fea05a13d65927a3ecd39b
chapter 157. Lambda Expressions - Capture List II -- commit d0cafa91887b68bf5d72f880d6758f3cd387172d
chapter 158. Lambda Expressions - Capture List III -- commit 8ba2721a49b57f956a9694f6af2bfef8d1c4b9f2
chapter 159. Generalized Lambda Capture (C++ 14) -- 604d74d3178b2400c17698a6dd5aae54064f5449
chapter 160. Assignment(lambda and function object) -- commit f9eee34da20420a74123e35a7fd9fbecd323592b
FunctionWraper/
chapter 161. std::function I -- commit 9d6966936217b4e62d6e30c9ffd3ee72377b1682
chapter 162. std::function II -- commit 95edbb87ae4d7f578d53c70ba83e4cdd6ba6c358
chapter 163. std::bind I -- commit f2166cf33de6fb4ef9a5260af5fd7eadb7279ba5
chapter 164. std::bind II -- commit f42a2e413ce4ec1bf8c053fb2b54d25a7c00a8d4
chapter 165. std::bind III -- commit 5dc010f3b6398c86dce5d9c86d7b23c81a5f4473
STL/
chapter 167. std::array -- commit 1058ac0b90f469d13a56fe4661a47018dff36605
chapter 168. std::vector -- commit 03e27cf17b75de834cbf69405448cc84eaa52868
chapter 169. std::deque -- commit ad7b78952b782f7f6960cc03295aca110fe11638
chapter 170. std::list -- commit b446a331aef949781181e9172a33f7cdbd508965
chapter 170. std::forwardlist -- commit 855ffe11bb88d03f52d7a45b3b4ee9d5db7f5ac1
chapter 172. std::set & std::multiset -- commit 7695ec29db3123de1f5f449549299de5fe716abe
chapter 173. std::map & std::multimap -- commit 80f9731f4cbe856f50e8a368fe1862081b25fbf1
chapter 176. Unordered Containers -- commit 1fe35afa9ced1c638afa9629cf3265172831907f
chapter 177. std::hash(c++11) -- commit 3ae1cd85d59f269bfe86195e2e91d71c6cb8b614
chapter 180. Algorithm - Part I -- commit 3b9594cc401e3cb87ed7aa175723706e94694f50
chapter 181. Algorithm - Part II -- commit a92cf90afebce25e4f9f9994158bcbfa4535e117
chapter 186. Container Changes in C++11 -- commit 8970d0278dc2631c6f6ac984a66aaf430cb06c04
Concurrency/
chapter 189. Concurrency Basics -- commit 675e89dfcd2e6311db9afe796746478f28711d62
chapter 190. Thread Creation -- commit 5b85f68887ac37de4fa2b1dad2a496b46ead47c1
chapter 191. Passing Arguments To Threads -- commit 74d4d1bc63d336fbfa1908cdbfc38ab64a2cb549
chapter 192. Returning Value from Threads -- commit 54dbf051b8002d6175597e8f53d01db30a4edc66
chapter 193. Thread Synchronization(std::mutex) -- commit 85571570c6a9f3706cbb4d8c176f200f5949689d
chapter 194. std::lock_guard -- commit e123cbd47df66809d92f31d6cb6eaa0f22831566
chapter 195. std::this_thread -- commit 3327ea858f20cf15f5f13585e6d96130301c1e06
chapter 196. Task Based Concurrency -- commit c1e377f89b5b3b3529b16d431e84181724bc9368
chapter 198. Launch Policies -- commit baae32a463f4dff1008fd5b1e8388d48e116cb8a
chapter 199. std::future Wait Functions -- commit 7757092659cd7343063c997ede14e5dcaf959e73
chapter 200. Using std::promise -- commit d4bdcea65bfae1043bd5862ce0e8c45b12a2f098
chapter 201. Propagating Exceptions Across Threads -- commit 9d43758c613b31d40feb632a0b3398669e746507
Core17Features/
chapter 205. Attributes -- commit 03a6fb34abea6e7940c81ed9d68dd264d2767400
chapter 206. Feature Test Macros -- commit d7102ffece4b215ab03d266375fc7f7258c67e85
chapter 207. If and Switch with Initialization -- commit 389fc27de3301faf7e115f6433cf2896b00cf197
chapter 208. inline Variables -- commit 99dc40e5055eec13572a536eb74a66972092fe7c
chapter 209. Nested Namespaces -- commit cf99dc7c7a5eb9a14f6878e00498c6307c8348e4
chapter 210. noexcept -- commit 7644c9f6468229dd5175e44b57d1491fee3aa691
chapter 211. constexpr Lambda -- commit 9e969dc8b3f9450bf7798f80209f4615c6623163
chapter 212. Structured Bindings -- commit 973a168f7ebd09b93954e7eb05f90578c8c87904
chapter 213. Expression Evaluation Order -- commit 3b1762d95f7c748c28290a59a7edd50d9d8ab770
chapter 215. Mandatory copy elision -- commit d62eca34dd275556947dfabb5caceb6384bcd279
Template17Features/
chapter 216. Class Template Argument Deduction(CTAD) -- commit 39f8317ec82492a3739d53039c281e08a7b85d09
chapter 217. Folding Basics -- commit e93c7dac106007858fea44ee0c9404b11aff309d
chapter 218. Fold Expressions Unary Folds -- commit ed17a3aa4bf82306b6bb3d9f47ab395a701f3c95
chapter 219. Fold Expressions Binary Folds -- commit bae9b8f488f1a8db9715bc4779a12fab4f980f7b
chapter 221. Type Traits Suffixes -- commit 74170f76b2a5c00329f3456793a128f1eb0b9561
chapter 222. if constexpr - I -- commit 4ba6b809630675dae137fff9a2ed020772a30735
chapter 223. if constexpr - II -- commit 90717d6403a27333cf6a0d9c46f43f8d61343e8d
STL17Components/
chapter 224. std::optional -- commit 740c4b470c39b3b936028cdd10270a8024af1d81
chapter 227. std::variant I -- commit 4feb6d18749086913a2fb66eff5c33c6feb1a12a
chapter 229. std::variant III -- commit c73c88e2c5d2886ceeb82d7e50dae961c1d24736
chapter 230. std::any -- commit 58404da2325e01b32b7c1a0777a9d0ffbc11b820
chapter 231. std::string_view -- commit 68abd52df9e626f06651e03d69b36f79ea88b923
chapter 233. filesystem - path -- commit 6be83be471aa367684cffad859dcefcace56eefb
chapter 234. filesystem - directory_entry -- commit 6d3d1427ed44a30aa00b75a732ca44453cd313c7
chapter 235. filesystem - Directory Functions -- commit b9716d2979f100f6482584a6b42b09bbaa9fce54
chapter 236. filesystem - Permissions -- commit 9f9f5dbf91b850e77a9350d8810e4a4ed50bddc5
chapter 237. Parallel Algorithms -- commit 4c940a730fb3f259fc83d07f687f4a01c62c7214

Modern C++ Concurrency in Depth(C++17/20) Chapter

ThreadManage/
chapter 4.  Launch a thread -- commit 665ee40cc19244da26c2670707c87d8e7c8433cb
chapter 6.  Joinability of threads -- commit c63a00e2fa4181fa7d191c23885b12bec64e2837
chapter 8.  Join in exception -- commit 6ce76ce258bd5654ff43b882337fd50df0c53259
chapter 9.  Sail a ship model -- commit 6e0843e6a8638ca493ac57b25b1d38f55e424419
chapter 10. Pass a parameter between two threads -- commit 386efe9f4bdcbf70f4a850ce567771569dc86130
chapter 11. Detach thread passing parameter -- commit 21486d530a589d3fdb495abfed9b32a0c629f4f8
chapter 12. Thransfer ownership of a thread -- commit e0d9c2005c06ea197ee8d3cb7cec2a070029d694
chapter 13. Useful operation on thread -- commit aee84fe0a824a2be1bcaeb6d1f6100653c9ea5d1
SailingCrew/
chapter 14. Sail a ship with work queue -- commit 043e79eda6f7e71332270db75b24b4aaf68a5c81
chapter 16. Parallel accumulate -- commit c1f40054c6e0b99589e3fe23f4457ed215179489
chapter 17. Thread local storage -- commit f3abc0faba40efac7c84b9dc84d863bb5257088d
ThreadSafe/
chapter 19. Mutexes -- commit cddc442044e39224d1ec7e22a2a291c90b7b6e12
chapter 22. Two senarios not thread safe even protected by mutex -- commit b9541f091cb331bc2bda86870cef245e40c601e7
chapter 24. Trivial Thread safe stack implementation -- commit 47ebe6e9ac940384b7f74ae2182490d20880c5ad
chapter 25. Thread safe stack implementation -- commit 4367b851cbb32d061d3ef2f1d1d869b0747eddc4 
chapter 27. unique locks -- commit a61b2c5d5da4fa37f77c6df963514a0af5491840
ConditionVariable/
chapter 29. introduction to condition variable -- commit a208f00dd532a3e166d2511399538cb472de232c
chapter 31. Thread safe queue implementation -- commit 0e321f58e3be02df065d73c78a1033551af8ac1f
chapter 32. introduction to futures and async tasks -- commit 9864be92a823ccc4ddb39df0dfcdfc4ef9d07d51
chapter 33. async tasks detailed policy -- commit 0596c58f5cd0c87eefcd4a1fa0c87f08ab040168
chapter 34. parallel accumulate -- commit af0050271087433fb8fe3aba41ecb3b848f0ca16
chapter 35. introduction to package_task -- commit cc6b507a1f2368cceafab5d440d72515e124ea54
chapter 36. Communication between threads using std::promises -- commit b3a8a597deec8586708ab949d120150a5caa922b
chapter 37. Retrieving exception using std::futures -- commit 25c95d734c2db5cc924e7172916df7e92cf92ea4
chapter 38. std::shared_futures -- commit 69c97a6430cf078bb6872a535790db0aa3caf917
LockBased/
chapter 40. queue data structure implementation -- commit 1632254cf2159b155cc9215f77b47add837613a9
chapter 41. thread safe queue implementation -- commit e9a7229d2de88d36bb2d5fc9cc130714868994ae
Parallel/
chapter 42. Parallel STL introduction -- commit bd71441fa3d8179085283d433d5eeba81cb7ce61
chapter 43. Parallel quick sort implementation -- commit bd71441fa3d8179085283d433d5eeba81cb7ce61
chapter 44. parallel for each -- commit 74b6a99de22af256de8eb676259297246d9f8811
chapter 45. parallel find algorithm -- commit 4386f861b68ee0535b99e8c38756b316f15f2528
chapter 46. parallel find async -- commit 01a3660594a4825fc41761866927b64d0b246cf1
chapter 47. Partial sum algorithm -- commit c8e7f7f22e3090272286dfade061a029eea31a13
chapter 48. Partial sum parallel implementation -- commit 99b8430987d44f64f47f1c5f6c7ab4cfe89ec423
chapter 49. Introduction to Matrix -- commit 48e8551f5e6d0612b3ffc839450ef9432678e48b
chapter 50. Parallel Matrix multiplication -- commit c1806ff37014a622a75c681271d1913c8a81dd60
chapter 51. Parallel matrix transpose -- commit 56ca91b3d6daf7765220bf55858c2e0fea2e6f1e
CPP20ConCurrency/
chapter 53. Jthread -- commit cf6598298997796e28ce5d9d7860fe5932e70671
chapter 54. Jthread own implementation -- commit 616282beb3b5b89c21b79eacb03ed5e78998fa5f
chapter 55. C++ coroutines -- commit a82187cd4ac3b306b35c1017da2931cad3a98386
chapter 57. C++ coroutines Generators -- commit 62ceaa61a0df167f5b1cb464c018aa5e7410af73
chapter 58. C++ Barriers -- commit 64abcfeb8d31abee8db1b273dbccc3b482081f9a
MemAtomic/
chapter 60. atomic_flag

现代 C++ 编程实战

chapter 04. 容器汇编 I:比较简单的若干容器 -- commit a99b1984aa3b29a0e6859e004e85c456a8002048

About

learningCPP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published