[Interest] deprecating class methods gracefully
Thiago Macieira
thiago.macieira at intel.com
Mon Nov 7 03:53:02 CET 2016
On segunda-feira, 7 de novembro de 2016 01:10:48 CST René J.V. Bertin wrote:
> Yes, but does that more than just print a warning? What I'm trying to do is
> phase out use of this method, but as long as I simply declare the thing
> deprecated software will continue to use it instead of the parent method it
> overrides. In this case source compatibility is handled through
> inheritance, and I only care about ABI compatibility because rebuilding all
> dependent code is too disruptive to be justified by what is basically just
> a bit of API cleanup.
If you want to remove an override (so long as it's not a virtual one), I'd do
an #ifdef and have a special file that sets the define.
#ifdef MYCLASS_INCLUDE_DEPRECATED
static void whatever(int mode);
#endif
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list