|
-
March 5th, 2006, 08:18 AM
#1
Binary compatibilty of C++ libraries
Hi all,
I've been trying to find out a bit about what does and what does not break binary compatibility of a C++ library and was coming across this site.
Most of it makes sense, but one point puzzles me:
You can... - change an inline function or make an inline function non-inline if it is safe that programs linked with the prior version of the library call the old implementation. This is tricky and might be dangerous. Think twice before doing it. Because of this, classes that are supposed to stay binary compatible should always have non-inline destructor, even if it's empty, otherwise the compiler will automatically generate an empty inlined one.
Now I understand that I cannot change an inline destructor without getting into danger, but when would I actually ever do that?
As I cannot add member variables (or rearrange member variables or make member variables of different types) anyways without breaking compatibilty, my destructor would actually have to contain some code to change in order for this rule to make sense. Hardly any of my destructors do, and if they do, it's something really trivial (not likely to change).
Am I overseeing something?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|