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

Ed Hourigan edmh007 at gmail.com
Sun Oct 30 14:53:36 CDT 2016


     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.





More information about the ace-bugs mailing list