Remove support for auto_ptr

This commit is contained in:
Alexander Grund 2020-09-24 22:54:13 +02:00
parent c7873cde4b
commit cf5ac87499
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
7 changed files with 0 additions and 150 deletions

View file

@ -32,12 +32,6 @@
# endif
#endif
#if !defined(BOOST_NO_AUTO_PTR)
# ifndef MOCK_NO_AUTO_PTR
# define MOCK_AUTO_PTR
# endif
#endif
#if defined(__cpp_lib_uncaught_exceptions) || \
defined(_MSC_VER) && (_MSC_VER >= 1900)
# ifndef MOCK_NO_UNCAUGHT_EXCEPTIONS

View file

@ -144,34 +144,6 @@ namespace detail
}
};
#ifdef MOCK_AUTO_PTR
template< typename Result, typename Signature >
class action< std::auto_ptr< Result >, Signature >
: public action_base< std::auto_ptr< Result >, Signature >
{
public:
template< typename Y >
void returns( Y* r )
{
v_.reset( r );
this->set( std::ref( v_ ) );
}
template< typename Y >
void returns( std::auto_ptr< Y > r )
{
v_ = r;
this->set( std::ref( v_ ) );
}
template< typename Y >
void returns( const std::reference_wrapper< Y >& r )
{
this->set( r );
}
private:
mutable std::auto_ptr< Result > v_;
};
#endif // MOCK_AUTO_PTR
}
} // mock

View file

@ -61,14 +61,6 @@ namespace detail
{};
}
#ifdef MOCK_AUTO_PTR
template< typename T >
stream& operator<<( stream& s, const std::auto_ptr< T >& t )
{
return s << mock::format( t.get() );
}
#endif // MOCK_AUTO_PTR
template< typename T1, typename T2 >
stream& operator<<( stream& s, const std::pair< T1, T2 >& p )
{