You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/03/06 18:38: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=17933095#comment-17933095 ]
ASF subversion and git services commented on AMQCPP-664:
--------------------------------------------------------
Commit 1744abf03e82eb6ca5864604240534f50c3cf6ec in activemq-cpp's branch refs/heads/3.9.x from Arjun Ray
[ https://gitbox.apache.org/repos/asf?p=activemq-cpp.git;h=1744abf0 ]
https://issues.apache.org/jira/browse/AMQCPP-664
AMQCPP-664 Global replace auto_ptr with unique_ptr; fix one test.
std::auto_ptr has been deprecated since C++11 and removed in C++17.
Fix one test: added an include (to resolve forward declaration).
> 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.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact