Commit Graph

13 Commits

Author SHA1 Message Date
Gennaro Prota
0177f4adfa Add a constructor from const CharT * (pointer to C-style string)
This is in preparation of the next commit, which will add a constructor
from std::basic_string_view (otherwise, construction from a C-style
string would be ambiguous between the basic_string_view and the
basic_string constructor).

Note that, rather than duplicating code to test the new member, we
changed many constructions in dyn_bitset_unit_tests1.cpp to use const
char *, instead of std::string. (The constructor from std::basic_string
is tested separately anyway.)
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
b428ca6365 Remove another workaround for CodeWarrior
Reason: Obsolete compiler.
2025-10-15 11:41:14 +02:00
Gennaro Prota
35b0094529 Add C++20 iterators
Reason: Requested on the mailing list.
2025-10-14 19:24:47 +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
12acc40123 Reformat all the C++ code (with ClangFormat) 2025-10-14 19:24:45 +02:00
Gennaro Prota
599cc67e9d Remove trailing whitespace 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
akr
12be4b4464 Added tests 2022-05-02 20:38:40 -04:00
Miutsuru kariya
ab192ca5f1 Make default constructor non-explicit (#48)
It is better to support copy-initialization with default constructor. cf. LWG Issue 2193. Default constructors for standard library containers are explicit.
2019-06-12 19:45:11 -04:00
Glen Fernandes
ccb380a1bc Switch from deprecated Test to LightweightTest 2019-06-07 07:02:31 -04:00
Glen Fernandes
d7d6555f85 Correct e-mail address 2018-09-05 08:11:50 -04:00
Daniel
d86f4ebddb Move tests into test subdirectory 2016-07-01 09:08:51 +01:00