@@ -2509,6 +2509,9 @@ Note that secondary cores in gem5 are kind of broken however: <<gem5-gdb-step-de
2509
2509
Bibliography:
2510
2510
2511
2511
* https://stackoverflow.com/questions/10490756/how-to-use-sched-getaffinity-and-sched-setaffinity-in-linux-from-c/50117787#50117787
2512
+ ** https://stackoverflow.com/questions/663958/how-to-control-which-core-a-process-runs-on/50210009#50210009
2513
+ ** https://stackoverflow.com/questions/280909/cpu-affinity/54478296#54478296
2514
+ ** https://unix.stackexchange.com/questions/73/how-can-i-set-the-processor-affinity-of-a-process-on-linux/441098#441098 (summary only)
2512
2515
* https://stackoverflow.com/questions/42800801/how-to-use-gdb-to-debug-qemu-with-smp-symmetric-multiple-processors
2513
2516
2514
2517
=== Linux kernel GDB scripts
@@ -20225,14 +20228,6 @@ Programs under link:userland/cpp/[] are examples of https://en.wikipedia.org/wik
20225
20228
20226
20229
* link:userland/cpp/empty.cpp[]
20227
20230
* link:userland/cpp/hello.cpp[]
20228
- * classes
20229
- ** constructor
20230
- *** link:userland/cpp/initializer_list_constructor.cpp[]: documents stuff like `std::vector<int> v{0, 1};` and `std::initializer_list`
20231
- *** link:userland/cpp/most_vexing_parse.cpp[]: the most vexing parse is a famous constructor vs function declaration syntax gotcha!
20232
- **** https://en.wikipedia.org/wiki/Most_vexing_parse
20233
- **** http://stackoverflow.com/questions/180172/default-constructor-with-empty-brackets
20234
- ** `virtual` and polymorphism
20235
- *** link:userland/cpp/virtual.cpp[]
20236
20231
* iostream
20237
20232
** link:userland/cpp/copyfmt.cpp[]: `std::copyfmt` restores stream state, see also: https://stackoverflow.com/questions/12560291/set-back-default-floating-point-print-precision-in-c/53673686#53673686
20238
20233
* fstream
@@ -20247,6 +20242,61 @@ Programs under link:userland/cpp/[] are examples of https://en.wikipedia.org/wik
20247
20242
*** link:userland/cpp/multimap.cpp[]: `std::multimap`
20248
20243
** <<algorithms>> contains a benchmark comparison of different c++ containers
20249
20244
20245
+ [[cpp-classes]]
20246
+ ==== C++ classes
20247
+
20248
+ [[cpp-constructor]]
20249
+ ===== C++ constructor
20250
+
20251
+ * link:userland/cpp/initializer_list_constructor.cpp[]: documents stuff like `std::vector<int> v{0, 1};` and `std::initializer_list`
20252
+ * link:userland/cpp/most_vexing_parse.cpp[]: the most vexing parse is a famous constructor vs function declaration syntax gotcha!
20253
+ ** https://en.wikipedia.org/wiki/Most_vexing_parse
20254
+ ** http://stackoverflow.com/questions/180172/default-constructor-with-empty-brackets
20255
+ * `virtual` and polymorphism
20256
+ ** link:userland/cpp/virtual.cpp[]
20257
+
20258
+ [[cpp-rule-of-five]]
20259
+ ====== C++ rule of five
20260
+
20261
+ link:userland/cpp/rule_of_five.cpp[]
20262
+
20263
+ Output Ubuntu 20.04 GCC 9.3:
20264
+
20265
+ ....
20266
+ constructor?
20267
+ constructor
20268
+
20269
+ copy?
20270
+ constructor
20271
+ copy
20272
+
20273
+ copy assignment?
20274
+ constructor
20275
+ copy assignment
20276
+ constructor
20277
+ copy
20278
+ move assignment
20279
+ destructor
20280
+
20281
+ move?
20282
+ constructor
20283
+
20284
+ move?
20285
+ constructor
20286
+ constructor
20287
+ move assignment
20288
+ destructor
20289
+
20290
+ a bunch of destructors?
20291
+ destructor
20292
+ destructor
20293
+ destructor
20294
+ destructor
20295
+ destructor
20296
+ ....
20297
+
20298
+ https://en.cppreference.com/w/cpp/language/rule_of_three
20299
+
20250
20300
[[cpp-standards]]
20251
20301
==== C++ standards
20252
20302
0 commit comments