[ace-bugs] use of deprecated std::auto_ptr ?

Johnny Willemsen jwillemsen at remedy.nl
Mon Oct 31 04:24:03 CDT 2016


Hi,

Thanks for using the PRF form. We have seen these warnings, but we just
can't easily switch to unique_ptr because we support a lot of platforms
that don't support C++11 yet. Probably we need to introduce some macros
that expand to auto_ptr or unique_ptr dependent on system settings but
doing that for the full code base is not a small task. Maybe you can do
that or fund such an effort?

Best regards,

Johnny Willemsen

Remedy IT
Postbus 81 | 6930 AB Westervoort | The Netherlands
http://www.remedy.nl

On 10/30/2016 08:53 PM, Ed Hourigan wrote:
>     ACE VERSION: 6.4.1
>
>
>     HOST MACHINE and OPERATING SYSTEM:   Fedora 24 ( 4.8.5 kernel )
>
>
>     TARGET MACHINE and OPERATING SYSTEM, if different from HOST: Same
>
>
>     THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>     specific file, simply state which one]:
>
>           config-linux.h
>
>
>     THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
>     use a link to a platform-specific file, simply state which one
>     (unless this isn't used in this case, e.g., with Microsoft Visual
>     C++)]:
>
>            platform_linux.GNU
>
>     CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>     (used by MPC when you generate your own makefiles): N/A
>
>     AREA/CLASS/EXAMPLE AFFECTED:
>
>     DOES THE PROBLEM AFFECT:
>         COMPILATION
>
>   SYNOPSIS:
>        ACE is using std::auto_ptr.  This appears to trip compiler
> warnings.
>
>     DESCRIPTION:
>
>       Seems harmless and applications built with ACE work fine. It
> seems like its time to stop using auto_ptr<T> ?   Someday it will be
> removed, so I've been told.
>
>     Are there plans to replace auto_ptr with unique_ptr or some other
> smart pointer ( e.g. boost )?
>
> >>>>>
>
>     Thread_Manager.cpp:591:3: warning: ‘template<class> class
> std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
>    auto_ptr<ACE_Thread_Descriptor> new_thr_desc
> (this->thread_desc_freelist_.remove ());
>    ^~~~~~~~
> In file included from /usr/include/c++/6.2.1/memory:81:0,
>                  from
> /data/acetao/ACE-6.4.1/ACE_wrappers/ace/Auto_Ptr.h:76,
>                  from Thread_Manager.cpp:6:
> /usr/include/c++/6.2.1/bits/unique_ptr.h:49:28: note: declared here
>    template<typename> class auto_ptr;
>                             ^~~~~~~~
> <<<<<<<<<
>
>     REPEAT BY:
>        Compile
>
>     SAMPLE FIX/WORKAROUND:
>        None.
>
>
>
> _______________________________________________
> ace-bugs mailing list
> ace-bugs at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/ace-bugs



More information about the ace-bugs mailing list