Gennaro Prota
54c841d585
Exercise subtraction between iterators in the unit tests
...
Reason: This was missing. And we forgot a friend declaration for the
corresponding operator-(), which will be added with the next commit.
2025-12-22 11:53:06 +01:00
Gennaro Prota
41799d3fe5
Take into account that the underlying container is not necessarily a std::vector in max_size()
...
The vector_max_size_workaround() we had in place, and one of the test
cases, only considered std::vectors, which are no longer the only
allowed containers. This commit fixes "Allow choosing the underlying
container type".
2025-10-15 11:41:44 +02:00
Gennaro Prota
957ee38823
Add some missing const qualifiers
2025-10-15 11:41:44 +02:00
Gennaro Prota
796fcb615b
Add more tests for reverse iterators
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
809b7a3796
Also test std::hash with bitsets having equal underlying vectors
...
This makes sure the size of the bitset is taken into account in the
calculation of the hash value.
2025-10-15 11:41:44 +02:00
Gennaro Prota
c9964a771b
Use the typename keyword for the template parameter of minimal_allocator
...
Reason: Consistency.
2025-10-15 11:41:44 +02:00
Gennaro Prota
6b5e49ea40
Assume locales and std::use_facet() are always available
...
I think the days we needed to cope with their absence are gone.
2025-10-15 11:41:44 +02:00
Gennaro Prota
bd00ce2e58
Reuse nth_bit() in bitset_test::append_block()
2025-10-15 11:41:43 +02:00
Gennaro Prota
f3d7d5c960
Improve the resize() tests
2025-10-15 11:41:43 +02:00
Gennaro Prota
63716d84a3
Clean up the swap() tests
...
Note that we still stated that references must be stable under a swap,
which is no longer true after "Allow choosing the underlying container
type".
2025-10-15 11:41:43 +02:00
Gennaro Prota
286e721430
Shorten a condition in the tests of max_size()
2025-10-15 11:41:43 +02:00
Gennaro Prota
7aca0a80fd
Remove an erroneous comment
2025-10-15 11:41:43 +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
cd68ee4632
Remove two useless comments
2025-10-15 11:41:43 +02:00
Gennaro Prota
f637b5bab1
Remove some special test code for the Dinkumware stdlib of MSVC 6
...
Reason: MSVC 6 is no longer supported.
2025-10-15 11:41:43 +02:00
Gennaro Prota
57bdff3f12
Remove an erroneous comment
2025-10-15 11:41:43 +02:00
Gennaro Prota
5a25945ed7
Remove superfluous parentheses in a return statement
2025-10-15 11:41:43 +02:00
Gennaro Prota
7755190288
Improve the tests of operator!=()
2025-10-15 11:41:43 +02:00
Gennaro Prota
b52e7cd97b
Improve the flip() tests
2025-10-15 11:41:43 +02:00
Gennaro Prota
134fab263b
Add a missing #include directive
2025-10-15 11:41:43 +02:00
Gennaro Prota
882e0e0665
Remove two superfluous #include directives
...
This fixes/completes "Remove other workarounds for obsolete compilers".
2025-10-15 11:41:43 +02:00
Gennaro Prota
4cf19a2b0a
Fix append< BlockInputIterator >() for input iterators
...
We were using `AllocatorOrContainer` as if it were still guaranteed to
be an allocator type. Unfortunately, the append() tests didn't exercise
input iterators, so this went unnoticed. I've now added tests.
2025-10-15 11:41:43 +02:00
Gennaro Prota
6f3634aa4b
Remove the dependency on core/allocator_access.hpp
2025-10-15 11:41:43 +02:00
Gennaro Prota
d8365ee015
Make the max_size() tests a bit more meaningful
2025-10-15 11:41:43 +02:00
Gennaro Prota
4ca26518ec
Add a missing comment
2025-10-15 11:41:43 +02:00
Gennaro Prota
8f07dd356a
Add push_front() and pop_front()
2025-10-15 11:41:43 +02:00
Gennaro Prota
efd4d41f60
No longer use BOOST_NO_CXX11_RVALUE_REFERENCES
...
Reason: We require decent C++11 support anyway.
2025-10-15 11:41:43 +02:00
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
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
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
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
d63c03ceb2
Leave inline to the compiler
2025-10-14 19:24:46 +02:00
Gennaro Prota
d839f23916
Make scoped_temp_file non-copyable, as it should
2025-10-14 19:24:46 +02:00
Gennaro Prota
963cc09f3c
Remove a nonsensical typedef
2025-10-14 19:24:46 +02:00
Gennaro Prota
a65fe4dd9e
Remove a few unneeded permission notices
2025-10-14 19:24:45 +02:00
Gennaro Prota
12acc40123
Reformat all the C++ code (with ClangFormat)
2025-10-14 19:24:45 +02:00
Gennaro Prota
93cd78c251
Remove a top-level const qualifier for a function parameter
2025-10-14 19:24:45 +02:00
Gennaro Prota
c6709f3c74
Add a missing const qualifier in a test function
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