pimpl idiom allows to reduce compilation dependencies in projects and have binary compatibility at the same time.
In other words you can change private implementation of a class without the need to recompile client's code.
Where can I find examples of such approach? Do you know any open source libraries or apps that uses it?
I know about QT and Poco:
- D-Pointer - Qt Wiki
- poco/IPAddress.h at develop · pocoproject/poco (but is this correct to include 'impl' header file in the 'public' header file? Any change in that private impl will cause recompilation.
Aucun commentaire:
Enregistrer un commentaire