14 Commits

Author SHA1 Message Date
Gennaro Prota
957ee38823 Add some missing const qualifiers 2025-10-15 11:41:44 +02:00
Gennaro Prota
982073fbcd Increase the test coverage 2025-10-15 11:41:44 +02:00
Gennaro Prota
7a00f3c051 No longer condition the use of (unsigned) long long on BOOST_HAS_LONG_LONG
Reason: We require C++11.
2025-10-15 11:41:43 +02:00
Gennaro Prota
6747f81566 Remove some outdated macros (workarounds for MSVC 6) 2025-10-15 11:41:42 +02:00
Gennaro Prota
1b8ef09564 Allow choosing the underlying container type
The user can now choose the underlying container type used by
dynamic_bitset. This allows e.g. having small buffer optimization by
using boost::container::small_vector.

Since the underlying container is no longer guaranteed to be
std::vector, we revert "Reflect some noexcept specifications of
std::vector in dynamic_bitset" and the related "Let MrDocs compile the
code as C++17".

Note that we didn't add serialization tests (dyn_bitset_unit_tests5.cpp)
because boost::container::small_vector has no serialization support.

This closes issue #76.
2025-10-14 19:24:47 +02:00
Gennaro Prota
e194055264 Add find_first_off(), find_first_off( size_type ) and find_next_off( size_type ) 2025-10-14 19:24:47 +02:00
Gennaro Prota
12acc40123 Reformat all the C++ code (with ClangFormat) 2025-10-14 19:24:45 +02:00
Gennaro Prota
2e0e407ad5 Use BOOST_TEST(), not assert(), for test cases 2025-10-14 19:24:45 +02:00
Gennaro Prota
e00b0048f9 Clean up all the #include sections
This commit:

- Sorts the #include directives: The #includes of the ""-form come
  first, those of the <>-form come later (this helps checking if any
  include file is not self-sufficient); in each of the two groups, the
  names of the headers or source files are sorted alphabetically (this
  eases searching for a specific #include and avoids duplicates).

- Uses the ""-form when including Boost files; using the <>-form is a
  relic of the past. This was even discussed on the developers list many
  years ago and led to core issue 370. Note that some parts of
  DynamicBitset were already using the ""-form and that has never caused
  any problem, AFAIK.

- Removes some comments attached to the directives themselves which
  seemed pretty useless and prone to get out of sync.
2025-09-11 12:31:09 +02:00
twomice
34f55c74b1 Implement find_first(pos). 2024-11-26 13:59:18 -05:00
Glen Fernandes
ccb380a1bc Switch from deprecated Test to LightweightTest 2019-06-07 07:02:31 -04:00
Edward Diener
0ead484c37 Implemented lexigraphic compare when bitsets have different lengths. 2017-05-17 20:59:08 -04:00
Edward Diener
dbfce8e174 Allow different sized bitsets to be compared for <, >, <=, >= 2017-05-15 13:03:15 -04:00
Daniel
d86f4ebddb Move tests into test subdirectory 2016-07-01 09:08:51 +01:00