Do not use components removed in C++17 (auto_ptr, binary_function)

This commit is contained in:
Peter Dimov
2016-11-06 15:35:46 +02:00
parent bdc19dee01
commit a7fbb0a841
6 changed files with 48 additions and 34 deletions

View File

@@ -16,8 +16,11 @@
#include <boost/scoped_array.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/config.hpp>
#include <memory>
template<class T, class U> void assert_same_type( T** pt = 0, U** pu = 0 )
{
pt = pu;
@@ -58,12 +61,16 @@ int main()
assert_same_type< boost::pointer_to_other< boost::intrusive_ptr<X>, void >::type, boost::intrusive_ptr<void> >();
assert_same_type< boost::pointer_to_other< boost::intrusive_ptr<void>, Y >::type, boost::intrusive_ptr<Y> >();
#if !defined( BOOST_NO_AUTO_PTR )
// auto_ptr
assert_same_type< boost::pointer_to_other< std::auto_ptr<X>, Y >::type, std::auto_ptr<Y> >();
assert_same_type< boost::pointer_to_other< std::auto_ptr<X>, void >::type, std::auto_ptr<void> >();
assert_same_type< boost::pointer_to_other< std::auto_ptr<void>, Y >::type, std::auto_ptr<Y> >();
#endif
// raw pointer
assert_same_type< boost::pointer_to_other< X *, Y >::type, Y * >();