The next sentence gives shared_ptr's type-erased Deleter as an example, which suggests that they are talking about type erasure. Other popular example of this technique are C++11's std::function and C++17's std::any (aka boost.any).
ok, but looking at std::function (see code sample below) where is the internally dynamic dispatch - I don't see any polymorphism here... (sorry I am probably a bit tired)
1 2 3 4 5 6 7
// store a free function
std::function<void(int)> f_display = print_num;
f_display(-9);
// store a lambda
std::function<void()> f_display_42 = []() { print_num(42); };
f_display_42();
Please elaborate a bit! :-)
Thanks
Juan
OR: can you provide a very simple example where the combination of static and dynamic polymorphism is evident?)