Share this postDaily bit(e) of C++Daily bit(e) of C++ | Type erasure: PIMPLCopy linkFacebookEmailNotesMoreDiscover more from Daily bit(e) of C++Random C++ knowledge organized in arbitrary order.Over 1,000 subscribersSubscribeBy subscribing, I agree to Substack's Terms of Use, and acknowledge its Information Collection Notice and Privacy Policy.Already have an account? Sign inDaily bit(e) of C++ | Type erasure: PIMPLDaily bit(e) of C++ #318, Type erasure using an explicit wrapper type using the PIMPL pattern.Šimon TóthNov 15, 20232Share this postDaily bit(e) of C++Daily bit(e) of C++ | Type erasure: PIMPLCopy linkFacebookEmailNotesMore2ShareThe 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.Click to open in Compiler Explorer.Leave a commentThanks for reading Daily bit(e) of C++! Subscribe for free to receive new posts and support my work.Subscribe2 Likes
What is the purpose of passing std::move(iface) to function taking by value?
void user(SomeInterface data) {