X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f66f6a5b3583b02c34854556eb83e3a808524ce..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/defs.h diff --git a/interface/wx/defs.h b/interface/wx/defs.h index a66d3b38a9..6783dc686a 100644 --- a/interface/wx/defs.h +++ b/interface/wx/defs.h @@ -1555,11 +1555,40 @@ template wxDELETE(T*& ptr); */ template wxDELETEA(T*& array); +/** + Generate deprecation warning with the given message when a function is + used. + + This macro can be used to generate a warning indicating that a function is + deprecated (i.e. scheduled for removal in the future) and explaining why is + it so and/or what should it be replaced with. It applies to the declaration + following it, for example: + @code + wxDEPRECATED_MSG("use safer overload returning wxString instead") + void wxGetSomething(char* buf, size_t len); + + wxString wxGetSomething(); + @endcode + + For compilers other than clang, g++ 4.5 or later and MSVC 8 (MSVS 2005) or + later, the message is ignored and a generic deprecation warning is given if + possible, i.e. if the compiler is g++ (any supported version) or MSVC 7 + (MSVS 2003) or later. + + @since 3.0 + + @header{wx/defs.h} + */ + /** This macro can be used around a function declaration to generate warnings indicating that this function is deprecated (i.e. obsolete and planned to - be removed in the future) when it is used. Only Visual C++ 7 and higher and - g++ compilers currently support this functionality. + be removed in the future) when it is used. + + Notice that this macro itself is deprecated in favour of wxDEPRECATED_MSG()! + + Only Visual C++ 7 and higher and g++ compilers currently support this + functionality. Example of use: