mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-19 04:12:09 +00:00
No longer use boost::move()
Reason: We require C++11 now, so we can use std::move().
This commit is contained in:
@@ -46,7 +46,7 @@ if (BOOST_DYNAMIC_BITSET_IS_ROOT)
|
||||
|
||||
# If BOOST_SRC_DIR is valid, fallback to find_package
|
||||
set(CMAKE_FOLDER Dependencies)
|
||||
set(BOOST_INCLUDE_LIBRARIES assert config container_hash core move throw_exception)
|
||||
set(BOOST_INCLUDE_LIBRARIES assert config container_hash core throw_exception)
|
||||
set(BOOST_EXCLUDE_LIBRARIES dynamic_bitset)
|
||||
set(PREV_BUILD_TESTING ${BUILD_TESTING})
|
||||
set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE)
|
||||
@@ -62,7 +62,6 @@ target_link_libraries(boost_dynamic_bitset
|
||||
Boost::config
|
||||
Boost::container_hash
|
||||
Boost::core
|
||||
Boost::move
|
||||
Boost::throw_exception
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ constant boost_dependencies :
|
||||
/boost/config//boost_config
|
||||
/boost/container_hash//boost_container_hash
|
||||
/boost/core//boost_core
|
||||
/boost/move//boost_move
|
||||
/boost/throw_exception//boost_throw_exception ;
|
||||
|
||||
project /boost/dynamic_bitset
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "boost/core/no_exceptions_support.hpp"
|
||||
#include "boost/dynamic_bitset/detail/lowest_bit.hpp"
|
||||
#include "boost/functional/hash/hash.hpp"
|
||||
#include "boost/move/move.hpp"
|
||||
#include "boost/throw_exception.hpp"
|
||||
#include <algorithm>
|
||||
#include <climits>
|
||||
@@ -29,6 +28,7 @@
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
# include <locale>
|
||||
@@ -644,7 +644,7 @@ operator=( const dynamic_bitset< Block, AllocatorOrContainer > & b )
|
||||
template< typename Block, typename AllocatorOrContainer >
|
||||
dynamic_bitset< Block, AllocatorOrContainer >::
|
||||
dynamic_bitset( dynamic_bitset< Block, AllocatorOrContainer > && b )
|
||||
: m_bits( boost::move( b.m_bits ) ), m_num_bits( boost::move( b.m_num_bits ) )
|
||||
: m_bits( std::move( b.m_bits ) ), m_num_bits( std::move( b.m_num_bits ) )
|
||||
{
|
||||
// Required so that BOOST_ASSERT(m_check_invariants()); works.
|
||||
BOOST_ASSERT( ( b.m_bits = buffer_type( get_allocator() ) ).empty() );
|
||||
@@ -660,8 +660,8 @@ operator=( dynamic_bitset< Block, AllocatorOrContainer > && b )
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_bits = boost::move( b.m_bits );
|
||||
m_num_bits = boost::move( b.m_num_bits );
|
||||
m_bits = std::move( b.m_bits );
|
||||
m_num_bits = std::move( b.m_num_bits );
|
||||
// Required so that BOOST_ASSERT(m_check_invariants()); works.
|
||||
BOOST_ASSERT( ( b.m_bits = buffer_type( get_allocator() ) ).empty() );
|
||||
b.m_num_bits = 0;
|
||||
|
||||
@@ -359,7 +359,7 @@ struct bitset_test
|
||||
move_constructor( const Bitset & b )
|
||||
{
|
||||
Bitset copy( b );
|
||||
Bitset b2( boost::move( copy ) );
|
||||
Bitset b2( std::move( copy ) );
|
||||
BOOST_TEST( b2 == b );
|
||||
}
|
||||
|
||||
@@ -369,8 +369,8 @@ struct bitset_test
|
||||
{
|
||||
Bitset b( lhs );
|
||||
Bitset c( rhs );
|
||||
b = boost::move( c );
|
||||
b = boost::move( b ); // self assignment check
|
||||
b = std::move( c );
|
||||
b = std::move( b ); // self assignment check
|
||||
BOOST_TEST( b == rhs );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user