Daily bit(e) of C++ | Type erasure: PIMPL
Daily bit(e) of C++ #318, Type erasure using an explicit wrapper type using the PIMPL pattern.
The inheritance approach to type erasure allows users to work simultaneously with multiple implementations.
However, if we only require one implementation at a time, we can choose a simpler and faster approach using the PIMPL pattern.
What is the purpose of passing std::move(iface) to function taking by value?
void user(SomeInterface data) {