[Development] Binary Compatibility question (KDE)

André Somers andre at familiesomers.nl
Fri Feb 28 11:10:41 CET 2014


Tony Van Eerd schreef op 27-2-2014 21:06:
> Sorry, there is probably a KDE email list or something that I should post this to, but I know it is very closely related to Qt:
>
> On http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B there is:
>
> You cannot...
>
> - For existing functions of any type:
> 	- add an overload (BC, but not SC: makes &func ambiguous), adding overloads to already overloaded functions is ok (any use of &func already needed a cast).
To me, it doesn't sound reasonable to expect an unqualified &func to 
stay source compatible. If you want your code to be source compatible 
with future vesions and you use function pointers, I'd suggest to always 
use the longer, ugly cast version. I don't think it is unreasonable that 
in the future overloads are introduced for existing functions, 
especially for non-slots.

BC is IMHO a big enough constraint. Lets not bind our hands even further...

André




More information about the Development mailing list