Output `[[deprecated('reason')]]` attribute where possible (if not `DISABLE_DEPRECATED`)
This might be better suited for mm-common
, but I didn't look in enough depth to see whether the likes of _WRAP_METHOD()
from glibmm
are delegating the deprecated
stuff to there. Please move if more appropriate!
We currently seem only to have two options: either define MODULE_DISABLE_DEPRECATED
and physically lose deprecated API, or don't and remain able to use it all without any build-time warnings and only realise it's deprecated if we check the resulting documentation.
Since C++14 added the [[deprecated('reason')]]
attribute, would it be possible for us to (if not disabling deprecated API) have the generated functions/typenames/whatever (see the reference) be annotated with this attribute, and pass the relevant reason as the explanatory string?
That would mean that we could retain the ability to build with deprecated API, as a transitional phase, but still be clearly warned that we should stop using it. I think that is more user-friendly than only being able to either manually refer to documentation, or physically disable API and break build.
I'd be happy to try working on this if it's agreed to be a good idea, but I'd appreciate a pointer or two about where to start if that's the case