Gennaro Prota
bb489c186a
Add a constructor from basic_string_view in C++17 or later
...
Note that we have MrDocs compile as C++17 again (a change that we had
reverted).
2025-10-15 11:41:43 +02:00
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
079cff781d
Don't test for Tr::eq( c, one ) twice in init_from_string()
2025-10-15 11:41:43 +02:00
Gennaro Prota
e00d9b30ae
No longer use boost::move()
...
Reason: We require C++11 now, so we can use std::move().
2025-10-15 11:41:43 +02:00
Gennaro Prota
ae9703b119
Actually test the move constructor in the move constructor tests
...
We were testing the *copy* constructor, instead.
2025-10-15 11:41:43 +02:00
Gennaro Prota
3ccf097dc1
Replace a #include of a deprecated include file
2025-10-15 11:41:43 +02:00
Gennaro Prota
88995c08b0
Remove a superfluous #include directive
2025-10-15 11:41:43 +02:00
Gennaro Prota
3531f6703b
Add missing const qualifiers
2025-10-15 11:41:43 +02:00
Gennaro Prota
0ff8509214
Make lowest_bit() more efficient
...
As a nice bonus, this also removes the dependency on Boost.Integer.
2025-10-15 11:41:43 +02:00
Gennaro Prota
08191fc025
Remove a spurious space
2025-10-15 11:41:43 +02:00
Gennaro Prota
759c4f4e4a
Fix a misleading variable name
2025-10-15 11:41:43 +02:00
Gennaro Prota
12dfcea22f
Get rid of BOOST_STATIC_ASSERT() and BOOST_STATIC_CONSTANT()
...
Reason: They are no longer necessary, given that we require C++11 now.
2025-10-15 11:41:43 +02:00
Gennaro Prota
526104dbe9
Assert that Block is the same type as AllocatorOrContainer::value_type
...
Reason: That's required both when AllocatorOrContainer is an allocator
type and when it's a container type. Now, when it is an allocator type,
the assert is usually in the implementation of std::vector, which we
use. But, when it's a container type, we need to assert that on our own.
2025-10-15 11:41:43 +02:00
Gennaro Prota
b6a875976d
Remove the parameter-less overloads of find_first() and find_first_off()
...
Reason: We can use a default argument, instead, which is what
dynamic_bitset usually does.
2025-10-15 11:41:43 +02:00
Gennaro Prota
394854535a
Make pop_back() more efficient
2025-10-15 11:41:43 +02:00
Gennaro Prota
1bef343d12
Back out the support for operator<=> in our iterators
...
Reason: It required operator<=> for the underlying container, and
boost::container::small_vector doesn't support it.
2025-10-15 11:41:42 +02:00
Gennaro Prota
0ca460971e
Make buffer_type public
...
Reason: Failures from GCC and Clang. See the new code comment.
2025-10-15 11:41:42 +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
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
54b32707c4
Don't repeat the preprocessing condition to specialize std::hash
2025-10-14 19:24:47 +02:00
Alan de Freitas
07e110d522
Make the MrDocs documentation multipage
2025-10-14 19:24:47 +02:00
Alan de Freitas
17e2192154
Support CMake root mode
2025-10-14 19:24:47 +02:00
Gennaro Prota
4a928c8787
Ensure all #includes are at the top of the source file
2025-10-14 19:24:47 +02:00
Gennaro Prota
f429a0a50d
Document our support for std::hash
2025-10-14 19:24:47 +02:00
Gennaro Prota
7f4078b1a9
Remove some symbol filters from mrdocs.yml
...
Reason: They no longer seem necessary.
2025-10-14 19:24:46 +02:00
Gennaro Prota
043b5e1c86
Reword a comment using singular they
2025-10-14 19:24:46 +02:00
Gennaro Prota
0052e61ccc
Document that max_size() doesn't emit exceptions
2025-10-14 19:24:46 +02:00
Gennaro Prota
f262bea730
Use noexcept instead of BOOST_NOEXCEPT
...
Reason: We require C++11 support anyway.
2025-10-14 19:24:46 +02:00
ivanpanch
1c82de1c51
Fix a typo (“slighly”) in a documentation comment
2025-10-14 19:24:46 +02:00
ivanpanch
b0bc76bfc8
Remove a spurious comma in a documentation comment
2025-10-14 19:24:46 +02:00
Gennaro Prota
b429e550e4
Avoid an interrupted sentence in the \brief documentation of the stream inserter
2025-10-14 19:24:46 +02:00
Gennaro Prota
aa7105f209
Use the same parameter name for the two overloads of at()
...
Reason: Consistency.
This incidentally also fixes the documentation of the non-const
overload.
2025-10-14 19:24:46 +02:00
Gennaro Prota
ac485ff3d2
Add a missing const qualifier
2025-10-14 19:24:46 +02:00
Gennaro Prota
ac2a5a65b4
Fix an error in the documentation of resize()
2025-10-14 19:24:46 +02:00
Gennaro Prota
80da0cdd28
Let MrDocs compile the code as C++17
...
Reason: Getting the noexcept specifications introduced in "Reflect some
noexcept specifications of std::vector in dynamic_bitset".
2025-10-14 19:24:46 +02:00
Gennaro Prota
431df92f41
Work around some glitches from the MrDocs parser
2025-10-14 19:24:46 +02:00
Gennaro Prota
6f1b27797d
Document our overload of hash_value()
2025-10-14 19:24:46 +02:00
Gennaro Prota
acc7f2a458
Fix two typos in the documentation comments
2025-10-14 19:24:46 +02:00
Gennaro Prota
8547f23e2d
Document many function parameters and some return values
...
For some of these, we were getting "undocumented parameter" warnings
from MrDocs. For others, MrDocs was automatically adding some
documentation, but that was inadequate for DynamicBitset.
2025-10-14 19:24:46 +02:00
Gennaro Prota
fa4f504a01
Run the Antora workflow on macOS 15, in GitHub Actions
2025-10-14 19:24:46 +02:00
Gennaro Prota
e848c84da3
Use the same parameter names in the two declarations of boost::swap()
...
Reason: Fixing an error from MSVC 14.3 about different noexcept
specifications between the two declarations.
2025-10-14 19:24:46 +02:00
Gennaro Prota
a7c9175201
Simplify a redundant assert condition
2025-10-14 19:24:46 +02:00
Gennaro Prota
74d1e42a3f
Reflect some noexcept specifications of std::vector in dynamic_bitset
...
This closes issue #85 .
2025-10-14 19:24:46 +02:00
Gennaro Prota
41c20338ef
Always use braces with for-statements, as well
...
Reason: Consistency and safety.
See: "Always use braces with if-statements".
2025-10-14 19:24:46 +02:00
Gennaro Prota
882a352a8e
Denote short and long consistently
2025-10-14 19:24:46 +02:00
Gennaro Prota
b2712c0112
Rename dynamic_bitset.tpp to "dynamic_bitset.ipp"
...
Reason: Having it copied at installation time.
2025-10-14 19:24:46 +02:00
Gennaro Prota
d63c03ceb2
Leave inline to the compiler
2025-10-14 19:24:46 +02:00