unique_ptr, shared_ptr, weak_ptr или reference_wrapper для отношений классов.
https://www.nextptr.com/tutorial/ta1450413058/unique_ptr-shared_ptr-weak_ptr-or-reference_wrapper-for-class-relationships
https://www.nextptr.com/tutorial/ta1450413058/unique_ptr-shared_ptr-weak_ptr-or-reference_wrapper-for-class-relationships
nextptr
C++ | unique_ptr, shared_ptr, weak_ptr, or reference_wrapper for class relationships
Modern-C++ constructs — unique_ptr, shared_ptr, weak_ptr, and reference_wrapper — express relationships among classes more intelligibly than raw pointers.
Что выведет код?
Anonymous Quiz
29%
0
44%
У программы неопределенное поведение
13%
Compiler Error
13%
Другое
Статья об упрощении использования стандартной библиотеки в C++20 с примерами.
https://cor3ntin.github.io/posts/tuple/
https://cor3ntin.github.io/posts/tuple/