mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-24 18:02:09 +00:00
Compare commits
1 Commits
boost-1.45
...
boost-1.38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37e08acf0b |
24
CMakeLists.txt
Normal file
24
CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# This file was automatically generated from the original CMakeLists.txt file
|
||||
# Add a variable to hold the headers for the library
|
||||
set (lib_headers
|
||||
dynamic_bitset.hpp
|
||||
dynamic_bitset_fwd.hpp
|
||||
dynamic_bitset
|
||||
)
|
||||
|
||||
# Add a library target to the build system
|
||||
boost_library_project(
|
||||
dynamic_bitset
|
||||
# SRCDIRS
|
||||
TESTDIRS test
|
||||
HEADERS ${lib_headers}
|
||||
# DOCDIRS
|
||||
DESCRIPTION "A runtime-sized version of std::bitset"
|
||||
MODULARIZED
|
||||
AUTHORS "Jeremy Siek <jeremy.siek -at- gmail.com>"
|
||||
"Chuck Allison"
|
||||
# MAINTAINERS
|
||||
)
|
||||
|
||||
|
||||
@@ -999,26 +999,20 @@ dynamic_bitset<Block, Allocator>::count() const
|
||||
using detail::dynamic_bitset_impl::access_by_blocks;
|
||||
using detail::dynamic_bitset_impl::value_to_type;
|
||||
|
||||
#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 3)
|
||||
// NOTE: Explicit qualification of "bits_per_block"
|
||||
// breaks compilation on gcc 4.3.3
|
||||
enum { no_padding = bits_per_block == CHAR_BIT * sizeof(Block) };
|
||||
#else
|
||||
// NOTE: Explicitly qualifying "bits_per_block" to workaround
|
||||
// regressions of gcc 3.4.x
|
||||
enum { no_padding =
|
||||
const bool no_padding =
|
||||
dynamic_bitset<Block, Allocator>::bits_per_block
|
||||
== CHAR_BIT * sizeof(Block) };
|
||||
#endif
|
||||
== CHAR_BIT * sizeof(Block);
|
||||
|
||||
enum { enough_table_width = table_width >= CHAR_BIT };
|
||||
const bool enough_table_width = table_width >= CHAR_BIT;
|
||||
|
||||
enum { mode = (no_padding && enough_table_width)
|
||||
const bool mode = (no_padding && enough_table_width)
|
||||
? access_by_bytes
|
||||
: access_by_blocks };
|
||||
: access_by_blocks;
|
||||
|
||||
return do_count(m_bits.begin(), num_blocks(), Block(0),
|
||||
static_cast<value_to_type<(bool)mode> *>(0));
|
||||
static_cast<value_to_type<mode> *>(0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
1
module.cmake
Normal file
1
module.cmake
Normal file
@@ -0,0 +1 @@
|
||||
boost_module(dynamic_bitset DEPENDS detail static_assert)
|
||||
7
test/CMakeLists.txt
Normal file
7
test/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
boost_additional_test_dependencies(dynamic_bitset BOOST_DEPENDS test config)
|
||||
|
||||
|
||||
boost_test_run(dyn_bitset_unit_tests1 ../dyn_bitset_unit_tests1.cpp)
|
||||
boost_test_run(dyn_bitset_unit_tests2 ../dyn_bitset_unit_tests2.cpp)
|
||||
boost_test_run(dyn_bitset_unit_tests3 ../dyn_bitset_unit_tests3.cpp)
|
||||
boost_test_run(dyn_bitset_unit_tests4 ../dyn_bitset_unit_tests4.cpp)
|
||||
Reference in New Issue
Block a user