[geos-devel] [GEOS] #843: Deprecated declarations warning macro

GEOS geos-trac at osgeo.org
Tue Sep 12 14:04:00 PDT 2017

#843: Deprecated declarations warning macro
 Reporter:  nila         |      Owner:  geos-devel@…
     Type:  enhancement  |     Status:  new
 Priority:  major        |  Milestone:  GEOS Future
Component:  Default      |    Version:  master
 Severity:  Unassigned   |   Keywords:
 I've seen the issue on deprecated declarations has been brought up before
 (eg. https://trac.osgeo.org/geos/ticket/815), and I'm not sure why it was
 closed without further ado. I can imagine it could be adventurous to
 remove deprecated code with short notice.
 Although, wouldn't it be good to have a macro (or a set of macros) issuing
 warnings when using deprecated code. In that way existing and future code
 depending on them can be easily noted and updated, e.g. using

 GEOS_DEPRECATED bool isSimple(const geom::LineString *geom);

 …would issue a DEPRECATED warning.

 I have experimented with a solution based on
 https://stackoverflow.com/a/21265197, and it seems to work fine on macOS
 at least for functions/methods.

Ticket URL: <https://trac.osgeo.org/geos/ticket/843>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

More information about the geos-devel mailing list