Updating C++ Class Libraries
I've got a shared object with a 开发者_如何学Pythonselection of classes performing various tasks. I'm wondering what are some of the best practices in updating these libraries without effecting those that consume them. How would I add a new class method while minimizing the impact, for example?
I've implemented the Pimpl idiom, what other techniques should I look into?
Read about binary-compatibility. As long as that is given (and the interface and behavior of the existing functions doesn't change) you should be fine.
Here is a link to an article to get you started: http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++
And another one: http://labs.qt.nokia.com/2009/08/12/some-thoughts-on-binary-compatibility/
精彩评论