更新 C++类库
我有一个共享对象,其中包含执行各种任务的精选类。我想知道在不影响那些使用它们的库的情况下更新这些库的最佳实践是什么。例如,我如何添加新的类方法,同时最大限度地减少影响?
我已经实现了 Pimpl idiom,我还应该研究哪些其他技术?
I've got a shared object with a selection 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
了解二进制兼容性。只要给出了这一点(并且现有函数的接口和行为不会改变),你应该没问题。
以下是一篇文章的链接,可帮助您入门: http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++
还有一个:
http://labs.qt.nokia。 com/2009/08/12/some-thoughts-on-binary-compatibility/
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/