Ponder the use of unique_ptr to enforce the Rule of Zero -- Marco Arena
Marco Arena points out an important difference between shared_ptr and unique_ptr regarding polymorphic deletion. The article also shows two ways to equip unique_ptr with a type-erased deleter, one with no usage of dynamic dispatching.
Ponder the use of unique_ptr to enforce the Rule of Zero
by Marco Arena
I read the article "Enforcing the Rule of Zero" from latest Overload (of ACCU) and I'd like to point out something that I misapprehended at a first reading. ... a clever point the author underlines is about polymorphic deletion: what to do when we want to support polymorphic deletion, or when our classes have virtual functions? ...
Then the author suggests to use a
shared_ptr: ...

Some high-performance techniques that you an use for more than just parsing, including this week's darling of memory management:
When you see anyone claim performance parity between <other language> and C++, one of the first things to look for is whether the C++ version of their test code is correctly using arrays and traversing them in order. If the test code is just doing equivalent pointer-chasing in both languages, the performance comparison is largely meaningless because the program is probably memory-bound and not properly written to use C++'s default container (
From the desk of an author going by the name Pubby, a nice short article showing off "yield return" using Boost's coroutines library: