2 ms·
Nice educational resource. Things like this help a lot relative to cppreference which often assumes the reader knows many things already. For example: https:
by photochemsyn 4y ago
Nice educational resource. Things like this help a lot relative to cppreference which often assumes the reader knows many things already. For example:
https://cppbyexample.com/what_is_unique_ptr.html https://cppbyexample.com/what_is_unique_ptr.html
https://en.cppreference.com/w/cpp/memory/unique_ptr https://en.cppreference.com/w/cpp/memory/unique_ptr
The former spells out the rationale for the design - such as why you might need get or why make_unique is better than new, and why copies are forbidden but moves are allowed - that the official reference sort of assumes the reader already understands.