Opened 7 years ago

Last modified 7 years ago

#11411 new Bugs

Deprecated std::... in get_pointer.hpp

Reported by: anonymous Owned by: Douglas Gregor
Milestone: To Be Determined Component: function
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

With g++-mp-5 (MacPorts gcc5 5.1.0_1) 5.1.0:

In file included from .../include/boost/bind/mem_fn.hpp:25:0,

from .../include/boost/mem_fn.hpp:22, from .../include/boost/function/detail/prologue.hpp:18, from .../include/boost/function/function_template.hpp:13, from .../include/boost/function/detail/maybe_include.hpp:18, from .../include/boost/function/function1.hpp:11,

...

.../include/boost/get_pointer.hpp:27:40: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]

template<class T> T * get_pointer(std::auto_ptr<T> const& p)

Change History (1)

comment:1 by pavel.odintsov@…, 7 years ago

Hello, folks!

I have same issue with gcc 5.2:

In file included from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:28:0,

from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/detail/shared_count.hpp:395:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:242:65: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:441:31: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:454:22: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:520:34: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

shared_ptr & operator=( std::auto_ptr<Y> & r )

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:529:34: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

shared_ptr & operator=( std::auto_ptr<Y> && r )

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/shared_ptr.hpp:17:0,

from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp: In member function ‘boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(std::auto_ptr<_Up>&&)’: /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:531:38: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/bind/mem_fn.hpp:25:0,

from /opt/boost_1_58_0/boost/mem_fn.hpp:22, from /opt/boost_1_58_0/boost/bind/bind.hpp:26, from /opt/boost_1_58_0/boost/bind.hpp:22, from /opt/boost_1_58_0/boost/thread/detail/thread.hpp:30, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:22, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/get_pointer.hpp: At global scope: /opt/boost_1_58_0/boost/get_pointer.hpp:27:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template<class T> T * get_pointer(std::auto_ptr<T> const& p)

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/thread/thread.hpp:13:0,

from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/thread/detail/thread_group.hpp: In member function ‘boost::thread* boost::thread_group::create_thread(F)’: /opt/boost_1_58_0/boost/thread/detail/thread_group.hpp:78:18: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

std::auto_ptr<thread> new_thread(new thread(threadfunc));

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

In file included from /opt/boost_1_58_0/boost/scoped_ptr.hpp:14:0,

from /opt/boost_1_58_0/boost/regex/v4/regex_workaround.hpp:41, from /opt/boost_1_58_0/boost/regex/v4/regex.hpp:32, from /opt/boost_1_58_0/boost/regex.hpp:31, from /usr/src/fastnetmon/src/fast_library.h:18, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/boost_1_58_0/boost/smart_ptr/scoped_ptr.hpp: At global scope: /opt/boost_1_58_0/boost/smart_ptr/scoped_ptr.hpp:68:31: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )

In file included from /opt/gcc520/include/c++/5.2.0/memory:81:0,

from /opt/boost_1_58_0/boost/config/no_tr1/memory.hpp:21, from /opt/boost_1_58_0/boost/smart_ptr/shared_ptr.hpp:23, from /opt/boost_1_58_0/boost/shared_ptr.hpp:17, from /opt/boost_1_58_0/boost/date_time/time_clock.hpp:17, from /opt/boost_1_58_0/boost/thread/thread_time.hpp:9, from /opt/boost_1_58_0/boost/thread/lock_types.hpp:18, from /opt/boost_1_58_0/boost/thread/pthread/thread_data.hpp:12, from /opt/boost_1_58_0/boost/thread/thread_only.hpp:17, from /opt/boost_1_58_0/boost/thread/thread.hpp:12, from /opt/boost_1_58_0/boost/thread.hpp:13, from /usr/src/fastnetmon/src/fast_library.h:16, from /usr/src/fastnetmon/src/fast_library.cpp:3:

/opt/gcc520/include/c++/5.2.0/bits/unique_ptr.h:49:28: note: declared here

template<typename> class auto_ptr;

Note: See TracTickets for help on using tickets.