Remove some superflous typedefs and default impls

This commit is contained in:
Alexander Grund 2020-07-14 21:23:30 +02:00
parent d9f9fce6fc
commit 476c1a7831
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
4 changed files with 5 additions and 34 deletions

View file

@ -112,17 +112,9 @@ namespace detail
, lock_( m )
{}
wrapper(const wrapper&) = delete;
wrapper( wrapper&& x )
: base_type( x )
, lock_( std::move( x.lock_) )
{}
wrapper( wrapper&& x ) = default;
wrapper& operator=(const wrapper&) = delete;
wrapper& operator=( wrapper&& x )
{
static_cast< base_type& >( *this ) = x;
lock_ = std::move( x.lock_ );
return *this;
}
wrapper& operator=( wrapper&& x ) = default;
wrapper& once()
{
this->e_->invoke( std::make_unique< detail::once >() );

View file

@ -21,15 +21,6 @@ namespace detail
BOOST_PP_ENUM_TRAILING_PARAMS(MOCK_NUM_ARGS, typename T) >
class function< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) >
{
public:
typedef R result_type;
template< typename Args >
struct sig
{
typedef R type;
};
private:
typedef function_impl<
R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )

View file

@ -48,19 +48,9 @@ namespace detail
m_->unlock();
}
lock( const lock& ) = delete;
lock( lock&& x )
: m_( x.m_ )
{
// Explicit reset to avoid unlock in destructor
x.m_.reset();
}
lock( lock&& x ) = default;
lock& operator=( const lock& ) = delete;
lock& operator=( lock&& x )
{
m_ = x.m_;
x.m_.reset();
return *this;
}
lock& operator=( lock&& x ) = default;
private:
std::shared_ptr< mutex > m_;

View file

@ -54,9 +54,7 @@ namespace detail
}
private:
typedef std::vector< void* > elements_type;
elements_type elements_;
std::vector< void* > elements_;
const std::shared_ptr< mutex > mutex_;
};
}