You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Bobby Yaros (Jira)" <ji...@apache.org> on 2021/05/24 14:59:00 UTC

[jira] [Commented] (AMQCPP-664) Replace std::auto_ptr with std::unique_ptr

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

Bobby Yaros commented on AMQCPP-664:
------------------------------------

It would be great if this could be merged. In my organization, we are having to make our own forks to make it C++17/C++20 compatible.

As mentioned in AMQCPP-628, if there is a reason this should not be merged, it would be nice to know about it.

> Replace std::auto_ptr with std::unique_ptr
> ------------------------------------------
>
>                 Key: AMQCPP-664
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-664
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 3.9.4
>            Reporter: Arjun Ray
>            Assignee: Timothy A. Bish
>            Priority: Major
>         Attachments: checkfix.diff, combo.diff, libfix.diff
>
>
> The C\+\+17 standard has eliminated std::auto_ptr, which was deprecated as of C\+\+11 a decade ago.  The code-base will therefore not even compile with modern compilers.
> Replacing std::auto_ptr with std::unique_ptr requires only 6 fix-ups, 5 of which are trivial and actually advisable for the existing code-base anyway, and 1 (in the tests) which exposes a flaw in the existing interfaces yet can be worked around relatively simply.
> [https://mail-archives.apache.org/mod_mbox/activemq-dev/202010.mbox/%3Ctblsoft4dbhg61h2c4cgsian0mevub7567%404ax.com%3E]
>  
> The three patches attached are
>     1. libfix.diff - 3 edits for the library build, while retaining std:;auto_ptr
>     2. checkfix.diff - 3 edits for the tests build, while retaining std::auto_ptr
>     3. combo.diff - everything, including the global search and replace.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)