[geos-devel] GeometryPtr or ...

Kurt Schwehr schwehr at gmail.com
Mon Dec 10 04:59:03 PST 2018


My take... Using a typedef might make sense until std:: gets an
implementation that is successfully battle tested and generally adopted.
std::auto_ptr miss the boat in many ways.  std::unique_ptr has staying
power and most new C++ coders are expected to know and use it.  So I think
hiding it behind a typedef is usually a hindrance to the reader.  I've
tried typedefs with it several times and it generally hurt more than it
helped.  And the cases where it seemed to help start going away with C++14
and C++17 IMHO.

https://stackoverflow.com/questions/3697686/why-is-auto-ptr-being-deprecated/15049187

On Sat, Dec 8, 2018 at 9:35 AM Sandro Santilli <strk at kbt.io> wrote:

> On Fri, Dec 07, 2018 at 09:08:01AM -0800, Martin Davis wrote:
>
> > * Makes implementation easier to change
>
> This was exactly the reason for starting to use that implementation.
> Wasn't it an auto_ptr before scoped_ptr existed ?
>
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel



-- 
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20181210/4da110e4/attachment.html>


More information about the geos-devel mailing list