#785: g++ 6 auto_ptr ------------------------+-------------------------- Reporter: rsbivand | Owner: geos-devel@… Type: defect | Status: new Priority: minor | Milestone: 3.5.1 Component: Default | Version: 3.5.0 Severity: Unassigned | Keywords: ------------------------+-------------------------- The use of auto_ptr throws warnings in g++ 6 in Fedora 24, chiefly in XMLTester:
{{{ In file included from ../../include/geos/geom/Geometry.h:27:0, from ../../include/geos/geom/Point.h:26, from XMLTester.cpp:27: ../../include/geos/geom/Envelope.h: At global scope: ../../include/geos/geom/Envelope.h:57:15: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] typedef std::auto_ptr<Envelope> AutoPtr; ^~~~~~~~ In file included from /usr/include/c++/6.1.1/memory:81:0, from ../../include/geos/geom/Envelope.h:29, from ../../include/geos/geom/Geometry.h:27, from ../../include/geos/geom/Point.h:26, from XMLTester.cpp:27: /usr/include/c++/6.1.1/bits/unique_ptr.h:49:28: note: declared here template<typename> class auto_ptr; ^~~~~~~~ }}} There are other wanings for other types of -W, such as the following, so it looks as though g++ 6 is stricter in checking: {{{ WKTWriter.cpp: In member function ‘void geos::io::WKTWriter::appendPointTaggedText(const geos::geom::Coordinate*, int, geos::io::Writer*)’: WKTWriter.cpp:239:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if( outputDimension == 3 && !old3D && coordinate != NULL ) ^~ WKTWriter.cpp:242:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ appendPointText(coordinate, level, writer); ^~~~~~~~~~~~~~~ }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/785> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel