[ 
https://issues.apache.org/jira/browse/TS-4052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043343#comment-15043343
 ] 

ASF GitHub Bot commented on TS-4052:
------------------------------------

GitHub user SolidWallOfCode opened a pull request:

    https://github.com/apache/trafficserver/pull/365

    TS-4052: Remove use of deprecated std::auto_ptr.

    Rather than figuring out how to integrate `std::unique_ptr` I just tweaked 
the CPP API and used that.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SolidWallOfCode/trafficserver ts-4052

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/365.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #365
    
----
commit 32ae8ce360c71d1e9f16d43bbba0b75ca4e6f476
Author: Alan M. Carroll <[email protected]>
Date:   2015-12-05T15:17:54Z

    TS-4052: Remove use of deprecated std::auto_ptr.

----


> auto_ptr is deprecated and should not be used in our code
> ---------------------------------------------------------
>
>                 Key: TS-4052
>                 URL: https://issues.apache.org/jira/browse/TS-4052
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Leif Hedstrom
>            Assignee: Alan M. Carroll
>             Fix For: 6.1.0
>
>
> I get the following build warnings:
> {code}
> In file included from ats-multiplexer.cc:29:0:
> dispatch.h:54:8: warning: 'template<class> class std::auto_ptr' is deprecated 
> [-Wdeprecated-declarations]
>    std::auto_ptr<ats::io::IO> io;
>         ^
> In file included from /opt/gcc5/include/c++/5.2.0/memory:81:0,
>                  from dispatch.h:27,
>                  from ats-multiplexer.cc:29:
> /opt/gcc5/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here
>    template<typename> class auto_ptr;
>                             ^
>   CXX      chunk-decoder.lo
>   CXX      dispatch.lo
> In file included from dispatch.cc:26:0:
> dispatch.h:54:8: warning: 'template<class> class std::auto_ptr' is deprecated 
> [-Wdeprecated-declarations]
>    std::auto_ptr<ats::io::IO> io;
>         ^
> In file included from /opt/gcc5/include/c++/5.2.0/memory:81:0,
>                  from dispatch.h:27,
>                  from dispatch.cc:26:
> /opt/gcc5/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here
>    template<typename> class auto_ptr;
>                             ^
>   CXX      fetcher.lo
>   CXX      original-request.lo
> In file included from original-request.cc:25:0:
> dispatch.h:54:8: warning: 'template<class> class std::auto_ptr' is deprecated 
> [-Wdeprecated-declarations]
>    std::auto_ptr<ats::io::IO> io;
>         ^
> In file included from /opt/gcc5/include/c++/5.2.0/memory:81:0,
>                  from dispatch.h:27,
>                  from original-request.cc:25:
> /opt/gcc5/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here
>    template<typename> class auto_ptr;
>                             ^
>   CXX      post.lo
> In file included from post.h:28:0,
>                  from post.cc:26:
> dispatch.h:54:8: warning: 'template<class> class std::auto_ptr' is deprecated 
> [-Wdeprecated-declarations]
>    std::auto_ptr<ats::io::IO> io;
>         ^
> In file included from /opt/gcc5/include/c++/5.2.0/memory:81:0,
>                  from dispatch.h:27,
>                  from post.h:28,
>                  from post.cc:26:
> /opt/gcc5/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here
>    template<typename> class auto_ptr;
> {code}
> I'm not sure what's the best option here, but we've used ats_scoped_obj in 
> plugins even though it's not a public API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to