I know adding static
member function is fine, but how about an enum
definition? No new data members, just it's definition.
A little background:
I need to add a static
member function (in a class), that will recognize (the function) the version of an IP
address by its string representation. The first thing, that comes to my mind is to declare a enum
for IPv4
, IPv6
and Unknown
and make this enum
return code of my function.
But I don't want to break the binary backward compatibility.
And a really bad question (for SO) - is there any source or question here, I can read more about that? I mean - what breaks the binary compatibility and what - does not. Or it depends on many things (like architecture, OS, compiler..)?
EDIT: Regarding the @PeteKirkham 's comment: Okay then, at least - is there a way to test/check for changed ABI or it's better to post new question about that?
EDIT2: I just found a SO Question : Static analysis tool to detect ABI breaks in C++ . I think it's somehow related here and answers the part about tool to check binary compatibility. That's why I relate it here.
gcc
tag. I know, that the standard does not say anything about that, but I thought that there could be another standard for this, something related toABI
or something :? – Kiril Kirovextern "C"
stuff if they want to be able to link against the platform's system calls and suchlike. – Steve Jessop