Commit Graph

524 Commits

Author SHA1 Message Date
Gennaro Prota
423f5ca364 Add find_last_one() and find_previous_one() 2026-01-13 10:52:06 +01:00
Gennaro Prota
35198124e6 Deprecate the names "find_first", "find_first_off", "find_next", "find_next_off"
Reason: Some people expressed a dislike for the name "find_first_off",
saying it causes confusion with "find_first_of" (although a
find_first_of() wouldn't make much sense for a bitset), so we choose a
new set of consistent names:

    find_first() → find_first_one()
    find_first_off() → find_first_zero()
    find_next() → find_next_one()
    find_next_off() → find_next_zero()
.
2026-01-09 16:48:31 +01:00
sehe
9b64641093 Add missing friend declaration
Fixes issue #100
2025-12-22 12:21:01 +01:00
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
7c4dbfa2ac Fix broken HTML link rendering in the rationale section of index.adoc
This replaces a raw `<a href...>`, which was rendered verbatim, with the
AsciiDoc link syntax.
boost-1.90.0.beta1 boost-1.90.0
2025-10-31 11:15:18 +01:00
Gennaro Prota
e19c647bc7 Fix the redirects from the old documentation locations 2025-10-31 10:58:48 +01:00
joaquintides
f12c918881 renamed build_docs.sh to build_antora.sh as per ci_boost_release.py requisites 2025-10-30 10:45:24 +01:00
joaquintides
354c63cb24 Adjust build_docs.sh for invocation from an external directory (PR #97) 2025-10-24 18:21:50 +02:00
Gennaro Prota
0622f6a59f Update package[-lock].json as per files in Boost.URL 2025-10-24 12:28:28 +02:00
joaquintides
3fab9dfdf7 Add b2-based doc building (PR #96) 2025-10-21 18:52:05 +02:00
Gennaro Prota
393b731466 Remove max_size_workaround()
Reason: I checked the three major standard library implementations and
they all take the allocator into account in max_size(), so the
workaround should be no longer necessary.
2025-10-15 11:41:44 +02: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
caee95bddd Make the implementation of find_next() consistent with that of find_next_off() 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
67115073d2 Fix the condition to choose the definition of BOOST_DYNAMIC_BITSET_CTYPE_FACET()
I realized that BOOST_USE_FACET() is always defined, so we have always
used one branch of the preprocessing conditional for all this time.
2025-10-15 11:41:44 +02:00
Gennaro Prota
a2d4a0ebbb Copy edit a comment 2025-10-15 11:41:43 +02:00
Gennaro Prota
2c7085502a Parenthesize a macro parameter 2025-10-15 11:41:43 +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
bf2e39ec65 Don't assume the underlying container is contiguous in operator<<=() and operator>>=()
Reason: This is no longer guaranteed. See "Allow choosing the underlying
container type".
2025-10-15 11:41:43 +02:00
Gennaro Prota
fd0c440888 Delete the copy constructor and the copy assignment operator of bit_appender
Reason: That's better than declaring them as private and leaving them
undefined.
2025-10-15 11:41:43 +02:00
Gennaro Prota
410068c17d Add constexpr support when compiling as C++20 or later
This support is only added for C++20 or later, as it would be too
limited in earlier standards.
2025-10-15 11:41:43 +02:00
Gennaro Prota
d8131f641c Add a \param paragraph to the documentation of find_first_off( size_type )
The meaning of the parameter was clear from the \return paragraph, but,
without an explicit \param paragraph, MrDocs would show the
documentation of size_type as documentation of the parameter.
2025-10-15 11:41:43 +02:00
Gennaro Prota
fc47959cd4 Remove an unused template parameter from allocator_type_extractor_impl 2025-10-15 11:41:43 +02:00
Gennaro Prota
8387c4f494 Use \post for postcondition paragraphs in the Javadoc comments
Reason: More specific command (also, consistency, as we use \pre for
preconditions).
2025-10-15 11:41:43 +02:00
Gennaro Prota
5f62214ad5 Make push_back() more efficient 2025-10-15 11:41:43 +02:00
Gennaro Prota
3ff4a319d9 Work around Clang 10, 11, 12 not providing std::bidirectional_iterator 2025-10-15 11:41:43 +02:00
Gennaro Prota
2cff357a91 Update the description of bit_appender
Reason: dynamic_bitset does have an append_at_right(), now; it's called
push_front().
2025-10-15 11:41:43 +02:00
Gennaro Prota
ff1a0fda26 Assert that both the underlying container and dynamic_bitset provide at least bidirectional iterators
The assert uses C++20 concepts, so it is only performed in C++20 or
later.

Note that, while evaluating the concept for the second assert, MSVC 2022
complained a constructor of class reference was private, therefore we
added a friend declaration.
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
68c5913983 Mark pre-C++11 compilers as unusable for the regression tests 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
843b6c3dd0 Fix two typos in two comments 2025-10-15 11:41:43 +02:00
Gennaro Prota
bbb2fa90df Update a comment about library issue 303 2025-10-15 11:41:43 +02:00
Gennaro Prota
15a73050cb Re-apply Clang-Format
We should really automate this. But, for the moment...
2025-10-15 11:41:43 +02:00