I think it would be a good idea to update CPL_WARNDEPRECATED to support both the C++14 attributes and the MSVC declspec deceleration. This is not as simple as updating the macro; attributes and declspec must come before the function deceleration, where gcc __attribute_\'s must come after.
I propose updating CPL_WARN_DEPRECATED to something like this, and then modifying every use of that macro to conform to the new format.
The macro CPL_WARN_DEPRECATED is defined like this: https://github.com/OSGeo/gdal/blob/4f9ae4b2304e9c7eb7070b4bab680080e4b461fd/gdal/port/cpl_port.h#L1010-L1021
C++14 added the attributes [[deprecated]] and [[deprecated(string-literal)]]. MSVC has declspec(deprecated) and declspec(deprecated(string-literal))
I think it would be a good idea to update CPL_WARNDEPRECATED to support both the C++14 attributes and the MSVC declspec deceleration. This is not as simple as updating the macro; attributes and declspec must come before the function deceleration, where gcc __attribute_\'s must come after.
I propose updating CPL_WARN_DEPRECATED to something like this, and then modifying every use of that macro to conform to the new format.
Calls to CPL_WARN_DEPRECATED would then be changed from:
to