mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added MOCK_NO_AUTO_PTR to deactivate std::auto_ptr support
This commit is contained in:
parent
238fff3fe2
commit
a22ca57253
8 changed files with 29 additions and 3 deletions
|
|
@ -82,4 +82,10 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_AUTO_PTR)
|
||||
# ifndef MOCK_NO_AUTO_PTR
|
||||
# define MOCK_AUTO_PTR
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // MOCK_CONFIG_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ 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 >
|
||||
|
|
@ -208,6 +209,7 @@ namespace detail
|
|||
private:
|
||||
mutable std::auto_ptr< Result > v_;
|
||||
};
|
||||
#endif // MOCK_AUTO_PTR
|
||||
}
|
||||
} // mock
|
||||
|
||||
|
|
|
|||
|
|
@ -53,11 +53,14 @@ 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 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue