Compare commits

..

64 Commits

Author SHA1 Message Date
Gennaro Prota
66690c41d1 Merge branch 'develop' into experiments/antora 2025-07-22 16:29:42 +02:00
Gennaro Prota
e475e3052f Fix a typo in the documentation of operator>>=() 2025-07-22 16:28:58 +02:00
Gennaro Prota
7f2d9b405f Shorten some brief descriptions in the docs
This simply separates the first sentence from the rest with a blank
line, so that MrDocs takes just the first sentence as brief description.
2025-07-22 16:27:19 +02:00
Gennaro Prota
472fcfe7f8 Add two missing spaces in a documentation comment 2025-07-22 16:17:47 +02:00
Gennaro Prota
224c1cf590 Merge branch 'develop' into experiments/antora 2025-07-22 12:40:31 +02:00
Gennaro Prota
6c69d92398 Also exclude bit_appender from the MrDocs documentation 2025-07-22 12:39:28 +02:00
Gennaro Prota
91b957bbbb Remove a pair of unneeded parentheses 2025-07-22 12:32:04 +02:00
Gennaro Prota
ad9b1a439e Also trigger CI for experiments/** 2025-07-21 18:42:12 +02:00
Gennaro Prota
06d510fca2 Set version for antora-cpp-reference-extension 2025-07-21 18:38:40 +02:00
Gennaro Prota
f01dcbe60b Fix nav.adoc 2025-07-18 19:30:56 +02:00
Gennaro Prota
757939f082 Add a few links to the reference in the documentation index 2025-07-18 19:29:58 +02:00
Gennaro Prota
4fee7e5a77 Add doc/package.json and doc/package-lock.json 2025-07-17 10:46:06 +02:00
Gennaro Prota
31504199cd Exclude old, failing versions of Clang and GCC from CI 2025-07-17 10:45:57 +02:00
Gennaro Prota
2357cd92b7 Also build the documentation in the CI workflow 2025-07-16 16:53:16 +02:00
James E. King III
a5398355ac Implement Boost.CI 2025.07 reusable workflow
This moves the majority of build logic into Boost.CI with configuration
options for consumers.  By moving build logic into Boost.CI we can fix
build issues faster for everyone.
2025-07-14 19:30:32 +02:00
Gennaro Prota
43ba4c9ca4 Rethrow any exception coming from the underlying vector, in the stream extractor 2025-07-14 19:30:32 +02:00
Gennaro Prota
e9d0f7ff0e Delete unary operator&() for dynamic_bitset::reference
Reason: That's better than declaring it as private and leaving it
undefined.
2025-07-14 19:30:32 +02:00
Gennaro Prota
8da24d5377 Don't add a semicolon after "BOOST_RETHROW"
Reason: When exceptions are enabled, the semicolon is already included
in the macro expansion, and the resulting second semicolon (empty
statement) may give compiler warnings. Note how we added braces, for
when exceptions are disabled and the macro has an empty replacement
list.
2025-07-14 19:30:31 +02:00
Gennaro Prota
71f8a37dc0 Add a missing blank line 2025-07-14 19:30:31 +02:00
Gennaro Prota
32dca8ac20 Remove an unnecessary constructor definition 2025-07-14 19:30:31 +02:00
Gennaro Prota
f684596b1d Remove an unnecessary implementation detail 2025-07-14 19:30:31 +02:00
Gennaro Prota
da2768d346 Add a definition for the copy constructor of dynamic_bitset::reference
Reason: Implicit definition is deprecated, because the class has a
user-declared copy assignment operator.

This closes issue #62.
2025-07-14 19:30:31 +02:00
Gennaro Prota
2928206d63 Make scoped_temp_file non-copyable, as it should 2025-07-14 19:30:31 +02:00
Gennaro Prota
c6f94b52ca Remove a nonsensical typedef 2025-07-14 19:30:31 +02:00
Gennaro Prota
367790225b Don't use lowerCamelCase for template type parameters 2025-07-14 19:30:31 +02:00
Gennaro Prota
fea6e4eecb Copy edit a comment 2025-07-14 19:30:31 +02:00
Gennaro Prota
26c9b60e36 Remove a few unneeded permission notices 2025-07-14 19:30:31 +02:00
Gennaro Prota
2675e65ce8 Port the documentation to MrDocs and Antora 2025-07-14 19:30:25 +02:00
Gennaro Prota
04b105c78f Reformat all the C++ code (with ClangFormat) 2025-07-07 15:34:23 +02:00
Gennaro Prota
d0f0182b3c Add a ClangFormat configuration file
This specifies a more readable style with respect to the existing one.
I'll reformat the code with the next commit.
2025-07-07 15:34:23 +02:00
Gennaro Prota
db21469d77 Move all the function definitions to a separate file
Reason: Improving readability of the class template declaration.

This separation was not originally possible due to limitations in older
compilers (see the removed comment at the start of the definition of
dynamic_bitset), but is now feasible.
2025-07-07 15:34:23 +02:00
Gennaro Prota
0ae6dd4e0e Leverage core::popcount() in the implementation of count()
Reason: This significantly simplifies the code, replacing a previous
complex and error-prone implementation.
2025-07-07 15:34:23 +02:00
Gennaro Prota
6477f68fb3 Fix some inconsistent placement of const qualifiers 2025-07-07 15:34:23 +02:00
Gennaro Prota
a35c951953 Assert on the precondition to pop_back() 2025-07-07 15:34:23 +02:00
Gennaro Prota
499916234e Make the swap() functions noexcept 2025-07-07 15:34:23 +02:00
Gennaro Prota
459df8c817 Remove a misleading comment 2025-07-07 15:34:23 +02:00
Gennaro Prota
0a95b0295a Remove a redundant assertion
We already assert that the two bitsets have the same size and, since
they have the same block_type, that implies they have the same number of
blocks.
2025-07-07 15:34:23 +02:00
Gennaro Prota
f33ec5bda7 Remove a top-level const qualifier for a function parameter 2025-07-07 15:34:15 +02:00
Gennaro Prota
ad57ed3f34 Add a missing const qualifier in a test function 2025-07-07 15:34:03 +02:00
Gennaro Prota
3d4661e2a8 Use BOOST_TEST(), not assert(), for test cases 2025-07-07 15:33:55 +02:00
Gennaro Prota
d4edc53c02 Remove other workarounds for obsolete compilers 2025-07-07 15:33:46 +02:00
Gennaro Prota
4f25dff8b2 Don't misuse the term "precondition" in the documentation
If you guarantee some behavior, e.g. throwing an exception, it's not
really a precondition.
2025-07-07 15:33:36 +02:00
Gennaro Prota
bb4ac379f9 Clean up detail/lowest_bit.hpp (mostly, reformat) 2025-07-07 15:33:26 +02:00
Gennaro Prota
060efe9166 Remove a naive comment
If you are asserting on it at the beginning of the function, it's
clearly a precondition :-).
2025-07-07 15:33:17 +02:00
Gennaro Prota
8d2b37a8f8 Replace the references to the SGI documentation
This commit just removes all the links to the SGI documentation and
replaces most of them with links to cppreference.com. The SGI docs were
likely used by Jeremy Siek at the time because they were a good and
clear reference. But we have cppreference.com now, which is much better.
And, in the event it disappears, we can still revert this commit.

Some links have simply been removed (e.g. those to the documentation of
basic_string, which really didn't seem opportune).
2025-07-07 15:33:10 +02:00
Gennaro Prota
cc2e543137 Remove inconsistent uses of title case 2025-07-07 15:33:01 +02:00
Gennaro Prota
7ee158b972 Remove trailing whitespace 2025-07-07 15:32:51 +02:00
Gennaro Prota
4339073d77 Remove an unneeded #include directive in a test file 2025-07-07 15:32:43 +02:00
Gennaro Prota
3bf84c9233 Remove a tab character in a test file 2025-07-07 15:32:32 +02:00
Gennaro Prota
702192bf52 Remove a superfluous #include directive 2025-07-07 15:32:24 +02:00
Gennaro Prota
2f497d44d7 Remove superfluous parentheses around a macro name 2025-07-07 15:32:15 +02:00
Gennaro Prota
ff6fc1f065 Copy edit the readme
Note how I removed the "Directories" paragraph, as it just stated the
obvious.
2025-07-07 15:32:05 +02:00
Gennaro Prota
96fad2cc08 Remove an unused, junk function template 2025-07-07 15:31:58 +02:00
Gennaro Prota
c6ecae2129 Consistently use BOOST_ASSERT() in the implementation
Note: Not in the unit tests, which better do without the dependency.
2025-07-07 15:31:48 +02:00
Gennaro Prota
a1fe5493c7 Remove a workaround for CodeWarrior 8 2025-07-07 15:31:16 +02:00
Gennaro Prota
b6a3959648 Remove a spurious #undef directive
The #undef'd macro wasn't actually defined anywhere.
2025-07-07 15:31:05 +02:00
Gennaro Prota
3aad037ed1 Declare some internal details as private
They had been accidentally made public.
2025-07-07 15:30:59 +02:00
Gennaro Prota
a6096f898e Remove some redundant access specifiers 2025-07-07 15:30:52 +02:00
Gennaro Prota
c6e1912392 Remove a hopefully outdated workaround 2025-07-07 15:30:43 +02:00
Gennaro Prota
b1e431c8e4 Remove a nonsensical usage of boost::addressof
Because `dynamic_bitset` doesn't overload unary `operator &`.
2025-07-07 15:30:24 +02:00
Gennaro Prota
ec4fce5d3e Fix the initial description in the documentation
This also aligns it with meta/libraries.json.
2025-07-07 15:30:11 +02:00
Gennaro Prota
c560925513 Update my email address etc. in the documentation 2025-07-07 15:30:01 +02:00
Gennaro Prota
79ebe76301 Fix the metadata in libraries.json
The main fix, here, is not stating that dynamic_bitset is a container.
It isn't (at least in the C++ meaning of the term), as specified in the
documentation.

I'm also taking over as a maintainer, so I added my email address.
2025-07-07 15:29:39 +02:00
Gennaro Prota
6c7c6618e6 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-07-07 15:29:28 +02:00
28 changed files with 2603 additions and 3929 deletions

View File

@@ -27,6 +27,7 @@ on:
- feature/**
- fix/**
- pr/**
- experiments/**
paths-ignore:
- LICENSE
- meta/**
@@ -51,7 +52,7 @@ jobs:
include:
- { name: Windows, os: windows-latest }
- { name: Ubuntu, os: ubuntu-latest }
- { name: macOS, os: macos-15 }
- { name: macOS, os: macos-latest }
runs-on: ${{ matrix.os }}
defaults:
run:
@@ -94,10 +95,10 @@ jobs:
cd dynamic_bitset
cd doc
bash ./build_antora.sh
bash ./build_docs.sh
# Antora returns zero even if it fails, so we check if the site directory exists.
if [ ! -d "html" ]
if [ ! -d "build/site" ]
then
echo "Antora build failed"
exit 1
@@ -107,4 +108,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: antora-docs-${{ matrix.name }}
path: doc/html
path: doc/build/site

View File

@@ -7,64 +7,26 @@
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_dynamic_bitset VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
set(BOOST_DYNAMIC_BITSET_IS_ROOT OFF)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(BOOST_DYNAMIC_BITSET_IS_ROOT ON)
endif ()
add_library(boost_dynamic_bitset INTERFACE)
add_library(Boost::dynamic_bitset ALIAS boost_dynamic_bitset)
target_include_directories(boost_dynamic_bitset INTERFACE include)
if (BOOST_DYNAMIC_BITSET_IS_ROOT)
# This means this script will be executed as the root CMakeLists.txt
# so the Boost:: targets are not available unless we explicitly include
# them here. MrDocs executes this script as root too.
if (NOT DEFINED BOOST_SRC_DIR AND DEFINED ENV{BOOST_SRC_DIR})
set(DEFAULT_BOOST_SRC_DIR "$ENV{BOOST_SRC_DIR}")
else ()
set(DEFAULT_BOOST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..")
endif ()
set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use when running CMake from this directory")
if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR})
set(BOOST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${BOOST_SRC_DIR}")
endif ()
# Validate BOOST_SRC_DIR
set(BOOST_SRC_DIR_IS_VALID ON)
foreach (F "CMakeLists.txt" "Jamroot" "boost-build.jam" "bootstrap.sh" "libs")
if (NOT EXISTS "${BOOST_SRC_DIR}/${F}")
message(STATUS "${BOOST_SRC_DIR}/${F} does not exist. Fallback to find_package.")
set(BOOST_SRC_DIR_IS_VALID OFF)
break()
endif ()
endforeach ()
if (NOT BOOST_SRC_DIR_IS_VALID)
message(FATAL_ERROR "BOOST_SRC_DIR is not valid. Please set it to the root of a Boost checkout.")
endif ()
# If BOOST_SRC_DIR is valid, fallback to find_package
set(CMAKE_FOLDER Dependencies)
set(BOOST_INCLUDE_LIBRARIES assert config container_hash core throw_exception)
set(BOOST_EXCLUDE_LIBRARIES dynamic_bitset)
set(PREV_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE)
add_subdirectory(${BOOST_SRC_DIR} Dependencies/boost EXCLUDE_FROM_ALL)
set(BUILD_TESTING ${PREV_BUILD_TESTING} CACHE BOOL "Build the tests." FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${BOOST_SRC_DIR}/tools/cmake/include")
unset(CMAKE_FOLDER)
if (NOT DYNAMIC_BITSET_MRDOCS_BUILD)
target_link_libraries(boost_dynamic_bitset
INTERFACE
Boost::assert
Boost::config
Boost::container_hash
Boost::core
Boost::integer
Boost::move
Boost::static_assert
Boost::throw_exception
)
endif()
target_link_libraries(boost_dynamic_bitset
INTERFACE
Boost::assert
Boost::config
Boost::container_hash
Boost::core
Boost::throw_exception
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
@@ -82,9 +44,6 @@ if (DYNAMIC_BITSET_MRDOCS_BUILD)
# Create a custom target for MrDocs.
add_library(dynamic_bitset_mrdocs_target ${TEMP_CPP_FILE})
# This is to get the documentation of the constructor from basic_string_view.
set_target_properties(dynamic_bitset_mrdocs_target PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED YES)
# Set any other target properties here.
target_include_directories(dynamic_bitset_mrdocs_target PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(dynamic_bitset_mrdocs_target PRIVATE boost_dynamic_bitset)

View File

@@ -10,6 +10,9 @@ constant boost_dependencies :
/boost/config//boost_config
/boost/container_hash//boost_container_hash
/boost/core//boost_core
/boost/integer//boost_integer
/boost/move//boost_move
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception ;
project /boost/dynamic_bitset

View File

@@ -1,57 +0,0 @@
import generate ;
import path ;
import property-set ;
import virtual-target ;
path-constant HERE : . ;
make html/index.html : build_antora.sh : @run-script ;
generate files-to-install : html/index.html : <generating-rule>@delayed-glob ;
install install
: files-to-install
: <location>html
<install-source-root>html/dynamic_bitset
;
explicit html/index.html files-to-install ;
# this runs the antora script
actions run-script
{
bash $(>)
}
# this globs after its sources are created
rule delayed-glob ( project name : property-set : sources * )
{
for local src in $(sources)
{
# the next line causes the source to be generated immediately
# and not later (which it normally would)
UPDATE_NOW [ $(src).actualize ] ;
}
# we need to construct the path to the globbed directory;
# this path would be <current-project>/antora
local root = [ path.root html [ $(project).location ] ] ;
local files ;
# actual globbing happens here
for local file in [ path.glob-tree $(root) : * ]
{
# we have to skip directories, because our match expression accepts anything
if [ CHECK_IF_FILE $(file) ]
{
# we construct a list of targets to copy
files += [ virtual-target.from-file $(file:D=) : $(file:D) : $(project) ] ;
}
}
# we prepend empty usage requirements to the result
return [ property-set.empty ] $(files) ;
}
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : install ;
explicit boostrelease ;

View File

@@ -18,9 +18,6 @@ else
PLAYBOOK=$1
fi
SCRIPT_DIR=$( dirname -- "${BASH_SOURCE[0]}" )
cd "$SCRIPT_DIR"
echo "Installing npm dependencies..."
npm ci

View File

@@ -13,6 +13,7 @@
site:
title: Boost.DynamicBitset
url: https://antora.cppalliance.org/develop/lib/doc
start_page: dynamic_bitset::index.adoc
robots: allow
keys:
@@ -24,9 +25,6 @@ content:
start_path: doc
edit_url: 'https://github.com/boostorg/dynamic_bitset/edit/{refname}/{path}'
output:
dir: html
ui:
bundle:
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip
@@ -41,6 +39,7 @@ antora:
using-namespaces:
- 'boost::'
- require: '@cppalliance/antora-cpp-reference-extension'
version: 'develop'
dependencies:
- name: 'boost'
repo: 'https://github.com/boostorg/boost.git'

View File

@@ -1,9 +1,5 @@
// ===========================================================================
// Copyright 2001 Jeremy Siek
// Copyright 2003-2004, 2008, 2025 Gennaro Prota
// Copyright 2014 Ahmed Charles
// Copyright 2014 Riccardo Marcangelo
// Copyright 2018 Evgeny Shulgin
// Copyright 2025 Gennaro Prota.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -46,11 +42,22 @@ an unsigned long `n`, the bit at position `i` of the bitset has the same value
as `(n >> i) & 1`.
== Rationale
Because of the proxy reference type, `dynamic_bitset` is not a
https://en.cppreference.com/w/cpp/named_req/Container.html[Container] and its
iterators do not satisfy the requirements for a LegacyForwardIterator. This
means that its iterators are not usable with many standard algorithms. However,
`dynamic_bitset` provides C++20 iterators which can be used with ranges.
`dynamic_bitset` is not a <a
href="https://en.cppreference.com/w/cpp/named_req/Container.html">Container</a>
and does not provide iterators for the following reason:
A container with a proxy reference type can not fulfill the container
requirements as specified in the C++ standard (unless one resorts to strange
iterator semantics). `std::vector<bool>` has a proxy reference type and does not
fulfill the container requirements and as a result has caused many problems. One
common problem is when people try to use iterators from `std::vector<bool>` with
a standard algorithm such as `std::search()`. The `std::search()` requirements
say that the iterator must be a LegacyForwardIterator, but
`std::vector<bool>::iterator` does not meet this requirement because of the
proxy reference. Depending on the implementation, they may or not be a compile
error or even a run-time error due to this misuse. For further discussion of the
problem see "Effective STL" by Scott Meyers. So `dynamic_bitset` tries to avoid
these problems by not pretending to be a container.
Some people prefer the name "toggle" to "flip". The name "flip" was chosen
because that is the name used in `std::bitset`. In fact, most of the function

View File

@@ -12,15 +12,15 @@ cmake: '-DDYNAMIC_BITSET_MRDOCS_BUILD=ON'
input:
- ../include
exclude-symbols:
- 'boost::bit_iterator_base'
- 'boost::bit_iterator'
- 'boost::const_bit_iterator'
- 'boost::detail'
- 'boost::detail::**'
- 'boost::to_string_helper'
- 'boost::dynamic_bitset::bit_appender'
- 'boost::dynamic_bitset::buffer_type'
- 'std'
- 'std::**'
# Why does MrDocs pick up ::size_t?
- 'size_t'
file-patterns:
- '*.hpp'
multipage: true
multipage: false
generator: adoc

188
doc/package-lock.json generated
View File

@@ -5,25 +5,38 @@
"requires": true,
"packages": {
"": {
"name": "doc",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@alandefreitas/antora-cpp-reference-extension": "^0.0.3",
"@antora/lunr-extension": "^1.0.0-alpha.10",
"@asciidoctor/tabs": "^1.0.0-beta.6",
"@cppalliance/antora-cpp-reference-extension": "^0.0.6",
"@cppalliance/antora-cpp-tagfiles-extension": "^0.0.4",
"@cppalliance/asciidoctor-boost-links": "^0.0.2",
"antora": "^3.1.10"
}
},
"node_modules/@alandefreitas/antora-cpp-reference-extension": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/@alandefreitas/antora-cpp-reference-extension/-/antora-cpp-reference-extension-0.0.3.tgz",
"integrity": "sha512-tgshdhPzjlfBaRG11jACMH9R4apAogTHAP2Y57qTj9m1YzeZqABNTRwor7uTCgB27bGLnWM73tT8EqguBEJ+yQ==",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"license": "BSL-1.0",
"dependencies": {
"@antora/expand-path-helper": "^2.0.0",
"@antora/lunr-extension": "^1.0.0-alpha.8",
"@asciidoctor/tabs": "^1.0.0-beta.3",
"@cppalliance/antora-cpp-reference-extension": "^0.0.8",
"@cppalliance/antora-cpp-tagfiles-extension": "^0.0.5",
"@cppalliance/asciidoctor-boost-links": "^0.0.2"
},
"devDependencies": {
"@antora/cli": "3.1.10",
"@antora/site-generator": "3.1.10",
"antora": "3.1.10"
"axios": "^1.7.2",
"cache-directory": "^2.0.0",
"fast-glob": "^3.3.2",
"isomorphic-git": "^1.27.1",
"js-yaml": "^4.1.0"
}
},
"node_modules/@antora/asciidoc-loader": {
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.1.10.tgz",
"integrity": "sha512-np0JkOV37CK7V4eDZUZXf4fQuCKYW3Alxl8FlyzBevXi2Ujv29O82JLbHbv1cyTsvGkGNNB+gzJIx9XBsQ7+Nw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/logger": "3.1.10",
@@ -38,7 +51,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.1.10.tgz",
"integrity": "sha512-gp8u9aVM0w1DtWSsB5PwvEfFYKrooPENLhN58RAfdgTrcsTsWw+CDysFZPgEaHB0Y1ZbanR82ZH/f6JVKGcZfQ==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/logger": "3.1.10",
@@ -57,7 +69,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.1.10.tgz",
"integrity": "sha512-OT6ZcCA7LrtNfrAZUr3hFh+Z/1isKpsfnqFjCDC66NEMqIyzJO99jq0CM66rYlYhyX7mb5BwEua8lHcwpOXNow==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/expand-path-helper": "~3.0",
@@ -84,7 +95,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-3.0.0.tgz",
"integrity": "sha512-7PdEIhk97v85/CSm3HynCsX14TR6oIVz1s233nNLsiWubE8tTnpPt4sNRJR+hpmIZ6Bx9c6QDp3XIoiyu/WYYA==",
"dev": true,
"license": "MPL-2.0",
"engines": {
"node": ">=16.0.0"
@@ -94,7 +104,6 @@
"version": "1.25.10",
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.10.tgz",
"integrity": "sha512-IxGiaKBwAdcgBXwIcxJU6rHLk+NrzYaaPKXXQffcA0GW3IUrQXdUPDXDo+hkGVcYruuz/7JlGBiuaeTCgIgivQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"async-lock": "^1.4.1",
@@ -120,7 +129,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.1.10.tgz",
"integrity": "sha512-3JJl4IIiTX00v/MirK603NoqIcHjGYAaRWt3Q4U03tI1Fv2Aho/ypO3FE45069jFf0Dx2uDJfp5kapb9gaIjdQ==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/asciidoc-loader": "3.1.10",
@@ -136,7 +144,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.1.10.tgz",
"integrity": "sha512-qi9ctgcKal8tZtWflVo66w+4zCJoBmUKRV+eA9aRRR09KDdU9r514vu1adWNgniPppISr90zD13V5l2JUy/2CQ==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/asciidoc-loader": "3.1.10"
@@ -158,7 +165,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/file-publisher/-/file-publisher-3.1.10.tgz",
"integrity": "sha512-DPR/0d1P+kr3qV4T0Gh81POEO/aCmNWIp/oLUYAhr0HHOcFzgpTUUoLStgcYynZPFRIB7EYKSab+oYSCK17DGA==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/expand-path-helper": "~3.0",
@@ -174,7 +180,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-3.0.0.tgz",
"integrity": "sha512-7PdEIhk97v85/CSm3HynCsX14TR6oIVz1s233nNLsiWubE8tTnpPt4sNRJR+hpmIZ6Bx9c6QDp3XIoiyu/WYYA==",
"dev": true,
"license": "MPL-2.0",
"engines": {
"node": ">=16.0.0"
@@ -184,7 +189,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.10.tgz",
"integrity": "sha512-WSuIxEP2tVrhWtTj/sIrwBDjpi4ldB/1Kpiu4PXmY4/qeWP8thW6u8nXdwdDcWss5zqkZWjourvWKwVq7y8Wjg==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/expand-path-helper": "~3.0",
@@ -200,7 +204,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-3.0.0.tgz",
"integrity": "sha512-7PdEIhk97v85/CSm3HynCsX14TR6oIVz1s233nNLsiWubE8tTnpPt4sNRJR+hpmIZ6Bx9c6QDp3XIoiyu/WYYA==",
"dev": true,
"license": "MPL-2.0",
"engines": {
"node": ">=16.0.0"
@@ -224,7 +227,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.10.tgz",
"integrity": "sha512-aLMK49nYsSB3mEZbLkmUXDAUYmscv2AFWu+5c3eqVGkQ6Wgyd79WQ6Bz3/TN9YqkzGL+PqGs0G39F0VQzD23Hw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/asciidoc-loader": "3.1.10"
@@ -237,7 +239,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.1.10.tgz",
"integrity": "sha512-JoEg8J8HVsnPmAgUrYSGzf0C8rQefXyCi/18ucy0utyfUvlJNsZvUbGUPx62Het9p0JP0FkAz2MTLyDlNdArVg==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/logger": "3.1.10",
@@ -252,7 +253,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.10.tgz",
"integrity": "sha512-UB8UmRYfkKgActTUlotdVS4FKGjaZgTnSXE7Fns1xb3/3HRanWvI+Yze1OmCkGC33cTpoQFnSYp7ySEH8LaiBw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@iarna/toml": "~2.2",
@@ -268,7 +268,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.10.tgz",
"integrity": "sha512-IbWJGh6LmsxJQ821h0B9JfooofFZBgFLZxsbp/IoTLkBFGLFAY5tDRvB6rvubfNLRoSjM8VjEUXGqVLlwZOb+g==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"vinyl": "~3.0"
@@ -281,7 +280,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/site-generator/-/site-generator-3.1.10.tgz",
"integrity": "sha512-NCULYtwUjIyr5FGCymhfG/zDVUmZ6pfmCPorka8mAzo4/GDx1T7bgaRL9rEIyf2AMqcm7apQiAz03mpU4kucsw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/asciidoc-loader": "3.1.10",
@@ -307,7 +305,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.1.10.tgz",
"integrity": "sha512-KY1j/y0uxC2Y7RAo4r4yKv9cgFm8aZoRylZXEODJnwj3tffbZ2ZdRzSWHp6fN0QX/Algrr9JNd9CWrjcj2f3Zw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/content-classifier": "3.1.10",
@@ -321,7 +318,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.1.10.tgz",
"integrity": "sha512-G4xcUWvgth8oeEQwiu9U1cE0miQtYHwKHOobUbDBt2Y6LlC5H31zQQmAyvMwTsGRlvYRgLVtG6j9d6JBwQ6w9Q==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/file-publisher": "3.1.10"
@@ -334,7 +330,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.1.10.tgz",
"integrity": "sha512-H1f5wI5a5HjLuE/Wexvc8NZy8w83Bhqjka7t1DbwOOqP+LyxFGLx/QbBVKdTtgFNDHVMtNBlplQq0ixeoTSh0A==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/expand-path-helper": "~3.0",
@@ -357,7 +352,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-3.0.0.tgz",
"integrity": "sha512-7PdEIhk97v85/CSm3HynCsX14TR6oIVz1s233nNLsiWubE8tTnpPt4sNRJR+hpmIZ6Bx9c6QDp3XIoiyu/WYYA==",
"dev": true,
"license": "MPL-2.0",
"engines": {
"node": ">=16.0.0"
@@ -367,7 +361,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/user-require-helper/-/user-require-helper-3.0.0.tgz",
"integrity": "sha512-KIXb8WYhnrnwH7Jj21l1w+et9k5GvcgcqvLOwxqWLEd0uVZOiMFdqFjqbVm3M+zcrs1JXWMeh2LLvxBbQs3q/Q==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/expand-path-helper": "~3.0"
@@ -380,7 +373,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-3.0.0.tgz",
"integrity": "sha512-7PdEIhk97v85/CSm3HynCsX14TR6oIVz1s233nNLsiWubE8tTnpPt4sNRJR+hpmIZ6Bx9c6QDp3XIoiyu/WYYA==",
"dev": true,
"license": "MPL-2.0",
"engines": {
"node": ">=16.0.0"
@@ -390,7 +382,6 @@
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.8.tgz",
"integrity": "sha512-oozXk7ZO1RAd/KLFLkKOhqTcG4GO3CV44WwOFg2gMcCsqCUTarvMT7xERIoWW2WurKbB0/ce+98r01p8xPOlBw==",
"dev": true,
"license": "MIT",
"dependencies": {
"asciidoctor-opal-runtime": "0.3.3",
@@ -412,31 +403,31 @@
}
},
"node_modules/@cppalliance/antora-cpp-reference-extension": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-reference-extension/-/antora-cpp-reference-extension-0.0.8.tgz",
"integrity": "sha512-iacd5+4e3yYF8hdxFWfA326H04hjYoYnUbBwu5rW0Y3HlDBGNx9E9ub/igLuzVFPftNlldqucEWHqhzgl7yfKA==",
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-reference-extension/-/antora-cpp-reference-extension-0.0.6.tgz",
"integrity": "sha512-Weud5Cn9KAoU3+fSA4IZM7THAEA8VPhclH7EfU6SiKSp/Iy92vSItpZioTmVrn0DIVo9tIxxrJXBp5GpSFk6hg==",
"license": "BSL-1.0",
"dependencies": {
"@antora/expand-path-helper": "^2.0.0",
"axios": "^1.12.2",
"axios": "^1.7.2",
"cache-directory": "^2.0.0",
"fast-glob": "^3.3.3",
"isomorphic-git": "^1.33.2",
"fast-glob": "^3.3.2",
"isomorphic-git": "^1.27.1",
"js-yaml": "^4.1.0",
"semver": "^7.7.2"
"semver": "^7.6.3"
}
},
"node_modules/@cppalliance/antora-cpp-tagfiles-extension": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.0.5.tgz",
"integrity": "sha512-ig6mktelQKpY0vepy8ilTne4kUWuGhhd5E2Oaf9CnucEuwYJ7rgpkQcNkp7ysk5zvnH1Ff4BVvcjuqsTpvY6QA==",
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-tagfiles-extension/-/antora-cpp-tagfiles-extension-0.0.4.tgz",
"integrity": "sha512-dzb/QDZ+a5yk7vaEb2jNQ5p02XjA6LfPmLRWcxqb/MvpA9DHZKsPunFDy+yqY3eGy9zqNppunljy9TZUbeoczg==",
"license": "BSL-1.0",
"dependencies": {
"@antora/expand-path-helper": "^2.0.0",
"cache-directory": "^2.0.0",
"fast-xml-parser": "^4.5.3",
"fast-xml-parser": "^4.4.1",
"he": "^1.2.0",
"isomorphic-git": "^1.33.2"
"isomorphic-git": "^1.27.1"
}
},
"node_modules/@cppalliance/asciidoctor-boost-links": {
@@ -449,7 +440,6 @@
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
"dev": true,
"license": "ISC"
},
"node_modules/@nodelib/fs.scandir": {
@@ -491,7 +481,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dev": true,
"license": "MIT",
"dependencies": {
"event-target-shim": "^5.0.0"
@@ -504,7 +493,6 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/antora/-/antora-3.1.10.tgz",
"integrity": "sha512-FcXPfqxi5xrGF2fTrFiiau45q8w0bzRcnfk97nxvpvztPDHX/lUOrBF/GpaGl1JT5K085VkI3/dbxTlvWK1jjw==",
"dev": true,
"license": "MPL-2.0",
"dependencies": {
"@antora/cli": "3.1.10",
@@ -527,7 +515,6 @@
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz",
"integrity": "sha512-/CEVNiOia8E5BMO9FLooo+Kv18K4+4JBFRJp8vUy/N5dMRAg+fRNV4HA+o6aoSC79jVU/aT5XvUpxSxSsTS8FQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"glob": "7.1.3",
@@ -553,7 +540,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
"integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.0.0"
@@ -575,13 +561,13 @@
}
},
"node_modules/axios": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz",
"integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.4",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
@@ -589,21 +575,18 @@
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz",
"integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true,
"license": "MIT"
},
"node_modules/bare-events": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz",
"integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==",
"dev": true,
"license": "Apache-2.0",
"optional": true
},
@@ -611,7 +594,6 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"funding": [
{
"type": "github",
@@ -632,7 +614,6 @@
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -655,7 +636,6 @@
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"dev": true,
"funding": [
{
"type": "github",
@@ -680,7 +660,6 @@
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "*"
@@ -755,7 +734,6 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.8"
@@ -765,7 +743,6 @@
"version": "2.0.20",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
"dev": true,
"license": "MIT"
},
"node_modules/combined-stream": {
@@ -784,7 +761,6 @@
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=16"
@@ -794,14 +770,12 @@
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
"license": "MIT"
},
"node_modules/convict": {
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/convict/-/convict-6.2.4.tgz",
"integrity": "sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"lodash.clonedeep": "^4.5.0",
@@ -827,7 +801,6 @@
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
"integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "*"
@@ -953,7 +926,6 @@
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
"dev": true,
"license": "MIT",
"dependencies": {
"once": "^1.4.0"
@@ -1020,7 +992,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -1030,7 +1001,6 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.8.x"
@@ -1040,14 +1010,12 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz",
"integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-fifo": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-glob": {
@@ -1070,7 +1038,6 @@
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz",
"integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -1080,7 +1047,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-xml-parser": {
@@ -1158,9 +1124,9 @@
}
},
"node_modules/form-data": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz",
"integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
@@ -1177,7 +1143,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true,
"license": "ISC"
},
"node_modules/function-bind": {
@@ -1231,7 +1196,6 @@
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
"license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
@@ -1273,7 +1237,6 @@
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"minimist": "^1.2.5",
@@ -1355,14 +1318,12 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz",
"integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==",
"dev": true,
"license": "MIT"
},
"node_modules/hpagent": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz",
"integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14"
@@ -1391,7 +1352,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true,
"funding": [
{
"type": "github",
@@ -1422,7 +1382,6 @@
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dev": true,
"license": "ISC",
"dependencies": {
"once": "^1.3.0",
@@ -1456,15 +1415,6 @@
"node": ">=0.10.0"
}
},
"node_modules/is-git-ref-name-valid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-git-ref-name-valid/-/is-git-ref-name-valid-1.0.0.tgz",
"integrity": "sha512-2hLTg+7IqMSP9nNp/EVCxzvAOJGsAn0f/cKtF8JaBeivjH5UgE/XZo3iJ0AvibdE7KSF1f/7JbjBTB8Wqgbn/w==",
"license": "MIT",
"engines": {
"node": ">=10"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
@@ -1508,9 +1458,9 @@
"license": "MIT"
},
"node_modules/isomorphic-git": {
"version": "1.34.0",
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.34.0.tgz",
"integrity": "sha512-J82yRa/4wm9VuOWSlI37I9Sa+n1gWaSWuKQk8zhpo6RqTW+ZTcK5c/KubLMcuVU3Btc+maRCa3YlRKqqY9q7qQ==",
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.32.1.tgz",
"integrity": "sha512-NZCS7qpLkCZ1M/IrujYBD31sM6pd/fMVArK4fz4I7h6m0rUW2AsYU7S7zXeABuHL6HIfW6l53b4UQ/K441CQjg==",
"license": "MIT",
"dependencies": {
"async-lock": "^1.4.1",
@@ -1518,13 +1468,12 @@
"crc-32": "^1.2.0",
"diff3": "0.0.3",
"ignore": "^5.1.4",
"is-git-ref-name-valid": "^1.0.0",
"minimisted": "^2.0.0",
"pako": "^1.0.10",
"path-browserify": "^1.0.1",
"pify": "^4.0.1",
"readable-stream": "^3.4.0",
"sha.js": "^2.4.12",
"sha.js": "^2.4.9",
"simple-get": "^4.0.1"
},
"bin": {
@@ -1538,7 +1487,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
"integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
@@ -1560,7 +1508,6 @@
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"license": "MIT",
"bin": {
"json5": "lib/cli.js"
@@ -1573,7 +1520,6 @@
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
"dev": true,
"license": "MIT"
},
"node_modules/lunr": {
@@ -1668,7 +1614,6 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -1699,7 +1644,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz",
"integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"progress": "^2.0.0"
@@ -1709,14 +1653,12 @@
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true,
"license": "MIT"
},
"node_modules/on-exit-leak-free": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",
"integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14.0.0"
@@ -1747,7 +1689,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -1757,14 +1698,12 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"dev": true,
"license": "MIT"
},
"node_modules/picomatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
@@ -1786,7 +1725,6 @@
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/pino/-/pino-9.2.0.tgz",
"integrity": "sha512-g3/hpwfujK5a4oVbaefoJxezLzsDgLcNJeITvC6yrfwYeT9la+edCK42j5QpEQSQCZgTKapXvnQIdgZwvRaZug==",
"dev": true,
"license": "MIT",
"dependencies": {
"atomic-sleep": "^1.0.0",
@@ -1809,7 +1747,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz",
"integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"readable-stream": "^4.0.0",
@@ -1820,7 +1757,6 @@
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"dev": true,
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",
@@ -1837,7 +1773,6 @@
"version": "11.2.2",
"resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz",
"integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==",
"dev": true,
"license": "MIT",
"dependencies": {
"colorette": "^2.0.7",
@@ -1863,7 +1798,6 @@
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"dev": true,
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",
@@ -1880,7 +1814,6 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz",
"integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==",
"dev": true,
"license": "MIT"
},
"node_modules/possible-typed-array-names": {
@@ -1896,7 +1829,6 @@
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.6.0"
@@ -1906,14 +1838,12 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz",
"integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==",
"dev": true,
"license": "MIT"
},
"node_modules/progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.4.0"
@@ -1929,7 +1859,6 @@
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
"dev": true,
"license": "MIT",
"dependencies": {
"end-of-stream": "^1.1.0",
@@ -1960,7 +1889,6 @@
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==",
"dev": true,
"license": "MIT"
},
"node_modules/readable-stream": {
@@ -1981,7 +1909,6 @@
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz",
"integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 12.13.0"
@@ -1991,14 +1918,12 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==",
"dev": true,
"license": "ISC"
},
"node_modules/replace-ext": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz",
"integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 10"
@@ -2008,7 +1933,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -2071,7 +1995,6 @@
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz",
"integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
@@ -2081,7 +2004,6 @@
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",
"integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==",
"dev": true,
"license": "BSD-3-Clause"
},
"node_modules/semver": {
@@ -2137,7 +2059,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz",
"integrity": "sha512-RPQhIndEIVUCjkfkQ6rs6sOR6pkxJWCNdxtfG5pP0RVgUYbK5911kLTF0TNcCC0G3YCGd492rMollFT2aTd9iQ==",
"dev": true,
"license": "MIT"
},
"node_modules/simple-concat": {
@@ -2189,7 +2110,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz",
"integrity": "sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"atomic-sleep": "^1.0.0"
@@ -2199,7 +2119,6 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -2209,7 +2128,6 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">= 10.x"
@@ -2219,7 +2137,6 @@
"version": "2.22.1",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.1.tgz",
"integrity": "sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-fifo": "^1.3.2",
@@ -2242,7 +2159,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -2267,7 +2183,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
"integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"streamx": "^2.12.5"
@@ -2277,7 +2192,6 @@
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz",
"integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"b4a": "^1.6.4"
@@ -2287,7 +2201,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz",
"integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==",
"dev": true,
"license": "MIT",
"dependencies": {
"real-require": "^0.2.0"
@@ -2337,7 +2250,6 @@
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
"integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
"dev": true,
"license": "BSD-2-Clause",
"optional": true,
"bin": {
@@ -2351,7 +2263,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unxhr/-/unxhr-1.0.1.tgz",
"integrity": "sha512-MAhukhVHyaLGDjyDYhy8gVjWJyhTECCdNsLwlMoGFoNJ3o79fpQhtQuzmAE4IxCMDwraF4cW8ZjpAV0m9CRQbg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.11"
@@ -2367,7 +2278,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-3.0.1.tgz",
"integrity": "sha512-0QwqXteBNXgnLCdWdvPQBX6FXRHtIH3VhJPTd5Lwn28tJXc34YqSCWUmkOvtJHBmB3gGoPtrOKk3Ts8/kEZ9aA==",
"dev": true,
"license": "MIT",
"dependencies": {
"clone": "^2.1.2",
@@ -2404,7 +2314,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
"dev": true,
"license": "MIT"
},
"node_modules/wrappy": {
@@ -2426,7 +2335,6 @@
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">=10"
@@ -2436,7 +2344,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.3.tgz",
"integrity": "sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==",
"dev": true,
"license": "MIT",
"dependencies": {
"buffer-crc32": "~0.2.3",
@@ -2450,7 +2357,6 @@
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz",
"integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==",
"dev": true,
"license": "MIT",
"dependencies": {
"buffer-crc32": "~0.2.3"

View File

@@ -1,15 +1,21 @@
{
"devDependencies": {
"@antora/cli": "3.1.10",
"@antora/site-generator": "3.1.10",
"antora": "3.1.10"
"name": "doc",
"version": "1.0.0",
"description": "The documentation for the dynamic_bitset library is the top-level index.html file.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@antora/expand-path-helper": "^2.0.0",
"@antora/lunr-extension": "^1.0.0-alpha.8",
"@asciidoctor/tabs": "^1.0.0-beta.3",
"@cppalliance/antora-cpp-reference-extension": "^0.0.8",
"@cppalliance/antora-cpp-tagfiles-extension": "^0.0.5",
"@cppalliance/asciidoctor-boost-links": "^0.0.2"
"@alandefreitas/antora-cpp-reference-extension": "^0.0.3",
"@antora/lunr-extension": "^1.0.0-alpha.10",
"@asciidoctor/tabs": "^1.0.0-beta.6",
"@cppalliance/antora-cpp-reference-extension": "^0.0.6",
"@cppalliance/antora-cpp-tagfiles-extension": "^0.0.4",
"@cppalliance/asciidoctor-boost-links": "^0.0.2",
"antora": "^3.1.10"
}
}

View File

@@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=doc/html/index.html">
<script>location="doc/html/index.html"</script>
<title>Automatic redirection</title>
</head>
<body>
<p>Automatic redirection failed. Please click <a href="doc/html/index.html">here</a>.</p>
<p>© Copyright 2025 Gennaro Prota.</p>
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
</body>
</html>

View File

@@ -1,7 +1,7 @@
// -----------------------------------------------------------
//
// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
// Copyright (c) 2003-2006, 2008, 2025 Gennaro Prota
// Copyright (c) 2003-2006, 2008 Gennaro Prota
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -34,18 +34,26 @@ make_non_const( T t )
# define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT( expr ) ( expr )
#endif
#if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
# define BOOST_DYNAMIC_BITSET_SPECIALIZE_STD_HASH
#endif
// A couple of macros to cope with libraries without locale
// support. The first macro must be used to declare a reference
// to a ctype facet. The second one to widen a char by using
// that ctype object. If facets and locales aren't available
// the first macro is a no-op and the second one just expands
// to its parameter c.
//
#if defined BOOST_USE_FACET
#if ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L
# define BOOST_DYNAMIC_BITSET_USE_CPP17_OR_LATER
#endif
# define BOOST_DYNAMIC_BITSET_CTYPE_FACET( ch, name, loc ) \
const std::ctype< ch > & name = \
BOOST_USE_FACET( std::ctype< ch >, loc ) /**/
#if ( defined( _MSVC_LANG ) && _MSVC_LANG >= 202002L ) || __cplusplus >= 202002L
# define BOOST_DYNAMIC_BITSET_CONSTEXPR20 constexpr
# define BOOST_DYNAMIC_BITSET_WIDEN_CHAR( fac, c ) \
( fac.widen( c ) )
#else
# define BOOST_DYNAMIC_BITSET_CONSTEXPR20
# define BOOST_DYNAMIC_BITSET_CTYPE_FACET( ch, name, loc ) /**/
# define BOOST_DYNAMIC_BITSET_WIDEN_CHAR( fac, c ) c
#endif
#endif // include guard

View File

@@ -1,7 +1,7 @@
// -----------------------------------------------------------
//
// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
// Copyright (c) 2003-2006, 2008, 2025 Gennaro Prota
// Copyright (c) 2003-2006, 2008 Gennaro Prota
// Copyright (c) 2014 Glen Joseph Fernandes
// (glenjofe@gmail.com)
// Copyright (c) 2018 Evgeny Shulgin
@@ -16,60 +16,20 @@
#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
#include "boost/config.hpp"
#include "boost/core/allocator_access.hpp"
#include <cstddef>
#include <memory>
#include <type_traits>
#include <utility>
namespace boost {
namespace detail {
namespace dynamic_bitset_impl {
template< typename AllocatorOrContainer, typename Block >
class is_container
{
private:
template< typename U >
static decltype( std::declval< U >().resize( std::size_t{} ), std::declval< U >()[ 0 ], typename U::value_type(), std::is_same< typename U::value_type, Block >{}, std::true_type{} ) test( int );
template< typename >
static std::false_type test( ... );
public:
static constexpr bool value = decltype( test< AllocatorOrContainer >( 0 ) )::value;
};
template< typename AllocatorOrContainer, bool IsContainer >
class allocator_type_extractor_impl;
template< typename AllocatorOrContainer >
class allocator_type_extractor_impl< AllocatorOrContainer, false >
{
public:
typedef AllocatorOrContainer type;
};
template< typename AllocatorOrContainer >
class allocator_type_extractor_impl< AllocatorOrContainer, true >
{
public:
typedef typename AllocatorOrContainer::allocator_type type;
};
template< typename AllocatorOrContainer, typename Block >
class allocator_type_extractor
{
public:
typedef typename allocator_type_extractor_impl<
AllocatorOrContainer,
is_container< AllocatorOrContainer, Block >::value >::type type;
};
template< typename T, int amount, int width /* = default */ >
struct shifter
{
static BOOST_DYNAMIC_BITSET_CONSTEXPR20 void
static void
left_shift( T & v )
{
amount >= width ? ( v = 0 )
@@ -82,6 +42,30 @@ struct value_to_type
{
};
// Some library implementations simply return a dummy
// value such as
//
// size_type(-1) / sizeof(T)
//
// from vector<>::max_size. This tries to get more
// meaningful info.
//
template< typename T >
inline typename T::size_type
vector_max_size_workaround( const T & v )
BOOST_NOEXCEPT
{
typedef typename T::allocator_type allocator_type;
const allocator_type & alloc = v.get_allocator();
typename boost::allocator_size_type< allocator_type >::type alloc_max =
boost::allocator_max_size( alloc );
const typename T::size_type container_max = v.max_size();
return alloc_max < container_max ? alloc_max : container_max;
}
// for static_asserts
template< typename T >
struct allowed_block_type
@@ -128,16 +112,19 @@ BOOST_dynamic_bitset_is_numeric( wchar_t );
#endif
BOOST_dynamic_bitset_is_numeric( signed char );
BOOST_dynamic_bitset_is_numeric( short );
BOOST_dynamic_bitset_is_numeric( short int );
BOOST_dynamic_bitset_is_numeric( int );
BOOST_dynamic_bitset_is_numeric( long );
BOOST_dynamic_bitset_is_numeric( long long );
BOOST_dynamic_bitset_is_numeric( long int );
BOOST_dynamic_bitset_is_numeric( unsigned char );
BOOST_dynamic_bitset_is_numeric( unsigned short );
BOOST_dynamic_bitset_is_numeric( unsigned int );
BOOST_dynamic_bitset_is_numeric( unsigned long );
BOOST_dynamic_bitset_is_numeric( unsigned long long );
#if defined( BOOST_HAS_LONG_LONG )
BOOST_dynamic_bitset_is_numeric( ::boost::long_long_type );
BOOST_dynamic_bitset_is_numeric( ::boost::ulong_long_type );
#endif
// intentionally omitted
// BOOST_dynamic_bitset_is_numeric(float);

View File

@@ -3,7 +3,7 @@
//
// Position of the lowest bit that is set.
//
// Copyright (c) 2003-2004, 2008, 2025 Gennaro Prota
// Copyright (c) 2003-2004, 2008 Gennaro Prota
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -15,8 +15,7 @@
#define BOOST_LOWEST_BIT_HPP_GP_20030301
#include "boost/assert.hpp"
#include "boost/core/bit.hpp"
#include <type_traits>
#include "boost/integer/integer_log2.hpp"
namespace boost {
namespace detail {
@@ -27,7 +26,10 @@ lowest_bit( T x )
{
BOOST_ASSERT( x >= 1 );
return boost::core::countr_zero( static_cast< typename std::make_unsigned< T >::type >( x ) );
// Clear all the bits that are set except the rightmost one,
// then calculate the logarithm to base 2.
//
return boost::integer_log2< T >( x - ( x & ( x - 1 ) ) );
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
namespace boost {
template< typename Block = unsigned long, typename AllocatorOrContainer = std::allocator< Block > >
template< typename Block = unsigned long, typename Allocator = std::allocator< Block > >
class dynamic_bitset;
}

View File

@@ -1,12 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv=refresh content="0; URL=doc/html/index.html">
<meta http-equiv=refresh content="0; URL=dynamic_bitset.html">
<title>Automatic redirection</title>
</head>
<body>
Automatic redirection failed, please go to
<a href="dynamic_bitset.html">doc/html/index.html</a>.&nbsp;<hr>
<a href="dynamic_bitset.html">dynamic_bitset.html</a>.&nbsp;<hr>
<p>© Copyright Beman Dawes, 2001</p>
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<explicit-failures-markup>
<library name="dynamic_bitset">
<mark-unusable>
<toolset name="*c++98"/>
<toolset name="*gnu98"/>
<toolset name="*c++0x"/>
<toolset name="*gnu0x"/>
<toolset name="msvc-7.1"/>
<toolset name="msvc-8.*"/>
<toolset name="msvc-9.*"/>
<toolset name="msvc-10.*"/>
<toolset name="msvc-11.*"/>
<note author="Gennaro Prota">DynamicBitset requires at least C++11.</note>
</mark-unusable>
</library>
</explicit-failures-markup>

View File

@@ -6,6 +6,7 @@
"Chuck Allison"
],
"description": "The dynamic_bitset template represents a set of bits. It provides access to the value of individual bits via operator[] and provides all of the bitwise operators that one can apply to builtin integers, such as operator& and operator<<. The number of bits in the set can change at runtime.",
"documentation": "dynamic_bitset.html",
"category": [
"Data structures"
],

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2008, 2025 Gennaro Prota
// Copyright (c) 2003-2006, 2008 Gennaro Prota
// Copyright (c) 2014 Ahmed Charles
// Copyright (c) 2014 Riccardo Marcangelo
// Copyright (c) 2018 Evgeny Shulgin
@@ -15,25 +15,21 @@
#define BOOST_BITSET_TEST_HPP_GP_20040319
#include "boost/config.hpp"
#include "boost/container/small_vector.hpp"
#include "boost/core/lightweight_test.hpp"
#include "boost/dynamic_bitset/dynamic_bitset.hpp"
#include "boost/filesystem.hpp"
#include "boost/limits.hpp"
#include <algorithm>
#include <assert.h> // <cassert> is sometimes macro-guarded :-(
#include <iterator>
#include <locale>
#include <sstream>
#include <string>
#include <type_traits>
#include <vector>
template< typename T >
using small_vector = boost::container::small_vector< T, 8 >;
#if ! defined( BOOST_NO_STD_LOCALE )
# include <locale>
#endif
template< typename Block >
bool
inline bool
nth_bit( Block num, std::size_t n )
{
#ifndef NDEBUG
@@ -87,6 +83,20 @@ private:
boost::filesystem::path m_path;
};
#if defined BOOST_NO_STD_LOCALE
template< typename Stream >
bool
is_one_or_zero( const Stream & /*s*/, char c )
{
return c == '1' || c == '0';
}
template< typename Stream >
bool
is_white_space( const Stream & /*s*/, char c )
{
return std::isspace( c );
}
#else
template< typename Stream, typename Ch >
bool
is_one_or_zero( const Stream & s, Ch c )
@@ -103,6 +113,7 @@ is_white_space( const Stream & s, Ch c )
{
return std::isspace( c, s.getloc() );
}
#endif
template< typename Stream >
bool
@@ -118,7 +129,7 @@ template< typename Bitset >
struct bitset_test
{
typedef typename Bitset::block_type Block;
static constexpr int bits_per_block = Bitset::bits_per_block;
BOOST_STATIC_CONSTANT( int, bits_per_block = Bitset::bits_per_block );
// from unsigned long
//
@@ -192,64 +203,6 @@ struct bitset_test
// If M < N, remaining bit positions are zero
for ( ; j < actual_size; ++j )
BOOST_TEST( b[ j ] == 0 );
#if defined( BOOST_DYNAMIC_BITSET_USE_CPP17_OR_LATER )
BOOST_TEST( Bitset( std::basic_string_view< Ch, Tr >( str ).substr( pos, rlen ), num_bits ) == b );
#endif
}
static void
iterate_forward( const Bitset & b )
{
std::ptrdiff_t i = 0;
for ( auto it = b.begin(); it != b.end(); ++it ) {
BOOST_TEST( *it == b[ i ] );
++i;
}
}
static void
iterate_backward( const Bitset & b )
{
std::ptrdiff_t i = static_cast< std::ptrdiff_t >( b.size() ) - 1;
for ( auto it = b.rbegin(); it != b.rend(); ++it ) {
BOOST_TEST( *it == b[ i ] );
--i;
}
}
static void
iterator_operations( const Bitset & b )
{
if ( b.size() >= 1 ) {
BOOST_TEST( *( b.end() - 1 ) == b[ b.size() - 1 ] );
BOOST_TEST( b.begin() < b.end() );
BOOST_TEST( b.begin() <= b.end() );
BOOST_TEST( b.end() > b.begin() );
BOOST_TEST( b.end() >= b.begin() );
BOOST_TEST( b.rbegin() < b.rend() );
BOOST_TEST( b.rbegin() <= b.rend() );
BOOST_TEST( b.rend() > b.rbegin() );
BOOST_TEST( b.rend() >= b.rbegin() );
typename Bitset::const_iterator it = b.begin();
it += b.size() / 2;
BOOST_TEST( *it == b[ b.size() / 2 ] );
it -= b.size() / 2;
BOOST_TEST( *it == b[ 0 ] );
} else {
BOOST_TEST( b.begin() == b.end() );
BOOST_TEST( b.rbegin() == b.rend() );
}
if ( b.size() > 1 ) {
BOOST_TEST( *( b.begin() + 1 ) == b[ 1 ] );
BOOST_TEST( *( 1 + b.begin() ) == b[ 1 ] );
BOOST_TEST( *( b.end() - 1 ) == b[ b.size() - 1 ] );
}
BOOST_TEST( b.end() - b.begin() == static_cast< std::ptrdiff_t >( b.size() ) );
}
static void
@@ -281,6 +234,8 @@ struct bitset_test
}
// TODO from_block_range (below) should be splitted
// PRE: std::equal(first1, last1, first2) == true
static void
from_block_range( const std::vector< Block > & blocks )
{
@@ -345,16 +300,16 @@ struct bitset_test
max_size( const Bitset & b )
{
BOOST_TEST( b.max_size() > 0 );
BOOST_TEST( b.max_size() >= b.size() );
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
// move constructor (absent from std::bitset)
static void
move_constructor( const Bitset & b )
{
Bitset copy( b );
Bitset b2( std::move( copy ) );
BOOST_TEST( b2 == b );
Bitset copy( boost::move( b ) );
BOOST_TEST( b == copy );
}
// move assignment operator (absent from std::bitset)
@@ -363,11 +318,13 @@ struct bitset_test
{
Bitset b( lhs );
Bitset c( rhs );
b = std::move( c );
b = std::move( b ); // self assignment check
b = boost::move( c );
b = boost::move( b ); // self assignment check
BOOST_TEST( b == rhs );
}
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
static void
swap( const Bitset & lhs, const Bitset & rhs )
{
@@ -379,21 +336,19 @@ struct bitset_test
BOOST_TEST( copy1 == rhs );
BOOST_TEST( copy2 == lhs );
// references must be stable under a swap
for ( typename Bitset::size_type i = 0; i < lhs.size(); ++i ) {
Bitset b1( lhs );
Bitset b2( rhs );
typename Bitset::reference ref = b1[ i ];
const bool x = ref;
bool x = ref;
if ( i < b2.size() )
b2[ i ] = ! x; // make sure b2[i] is different
b1.swap( b2 );
BOOST_TEST( b2[ i ] == x ); // now it must be equal
// b2.flip( i );
// Since we transformed the Allocator parameter into
// AllocatorOrContainer, the following is no longer true (think e.g.
// of boost::container::small_vector).
// BOOST_TEST( ref == b2[ i ] ); // .. and ref must be into b2
// BOOST_TEST( ref == ! x );
BOOST_TEST( b2[ i ] == x ); // now it must be equal..
b2.flip( i );
BOOST_TEST( ref == b2[ i ] ); // .. and ref must be into b2
BOOST_TEST( ref == ! x );
}
}
@@ -403,14 +358,11 @@ struct bitset_test
Bitset b( lhs );
// Test no change in size
b.resize( lhs.size(), true);
BOOST_TEST( b == lhs );
b.resize( lhs.size(), false );
b.resize( lhs.size() );
BOOST_TEST( b == lhs );
// Test increase in size with new bits to true
// Test increase in size
b.resize( lhs.size() * 2, true );
BOOST_TEST( b.size() == lhs.size() * 2 );
std::size_t i;
for ( i = 0; i < lhs.size(); ++i )
@@ -420,17 +372,8 @@ struct bitset_test
// Test decrease in size
b.resize( lhs.size() );
BOOST_TEST( b.size() == lhs.size() );
for ( i = 0; i < lhs.size(); ++i )
BOOST_TEST( b[ i ] == lhs[ i ] );
// Test increase in size with new bits to false
b.resize( lhs.size() * 2, false );
BOOST_TEST( b.size() == lhs.size() * 2 );
for ( i = 0; i < lhs.size(); ++i )
BOOST_TEST( b[ i ] == lhs[ i ] );
for ( ; i < b.size(); ++i )
BOOST_TEST( b[ i ] == false );
}
static void
@@ -456,21 +399,6 @@ struct bitset_test
BOOST_TEST( b[ j ] == lhs[ j ] );
}
static void
pop_front( const Bitset & lhs )
{
Bitset b( lhs );
b.pop_front();
BOOST_TEST( b.size() == lhs.size() - 1 );
for ( std::size_t i = 0; i < b.size(); ++i )
BOOST_TEST( b[ i ] == lhs[ i + 1 ] );
b.pop_front();
BOOST_TEST( b.size() == lhs.size() - 2 );
for ( std::size_t j = 0; j < b.size(); ++j )
BOOST_TEST( b[ j ] == lhs[ j + 2 ] );
}
static void
append_bit( const Bitset & lhs )
{
@@ -489,23 +417,6 @@ struct bitset_test
BOOST_TEST( b[ j ] == lhs[ j ] );
}
static void
prepend_bit( const Bitset & lhs )
{
Bitset b( lhs );
b.push_front( true );
BOOST_TEST( b.size() == lhs.size() + 1 );
BOOST_TEST( b[ 0 ] == true );
for ( std::size_t i = 0; i < lhs.size(); ++i )
BOOST_TEST( b[ i + 1 ] == lhs[ i ] );
b.push_front( false );
BOOST_TEST( b.size() == lhs.size() + 2 );
BOOST_TEST( b[ 0 ] == false );
BOOST_TEST( b[ 1 ] == true );
for ( std::size_t j = 0; j < lhs.size(); ++j )
BOOST_TEST( b[ j + 2 ] == lhs[ j ] );
}
static void
append_block( const Bitset & lhs )
{
@@ -514,7 +425,7 @@ struct bitset_test
b.append( value );
BOOST_TEST( b.size() == lhs.size() + bits_per_block );
for ( int i = 0; i < bits_per_block; ++i )
BOOST_TEST( b[ lhs.size() + i ] == nth_bit( value, i ) );
BOOST_TEST( b[ lhs.size() + i ] == bool( ( value >> i ) & 1 ) );
}
static void
@@ -529,20 +440,6 @@ struct bitset_test
BOOST_TEST( b == c );
}
static void
append_block_range_input_iter( const Bitset & lhs )
{
if ( ! std::is_same< Block, unsigned char >::value ) {
Bitset b( lhs ), c( lhs );
std::istringstream ss( "1 2 3" );
b.append( std::istream_iterator< Block >( ss ), std::istream_iterator< Block >() );
c.append( 1 );
c.append( 2 );
c.append( 3 );
BOOST_TEST( b == c );
}
}
// operator[] and reference members
// PRE: b[i] == bit_vec[i]
static void
@@ -807,7 +704,6 @@ struct bitset_test
std::size_t N = lhs.size();
Bitset prev( lhs );
lhs.flip();
BOOST_TEST( lhs.size() == N );
// Toggles all the bits in lhs
for ( std::size_t I = 0; I < N; ++I )
BOOST_TEST( lhs[ I ] == ! prev[ I ] );
@@ -821,7 +717,6 @@ struct bitset_test
if ( pos < N ) {
Bitset prev( lhs );
lhs.flip( pos );
BOOST_TEST( lhs.size() == N );
// Toggles the bit at position pos in lhs
BOOST_TEST( lhs[ pos ] == ! prev[ pos ] );
@@ -893,6 +788,7 @@ struct bitset_test
}
}
// to_string()
static void
to_string( const Bitset & b )
{
@@ -921,9 +817,19 @@ struct bitset_test
}
static void
capacity( const Bitset & lhs )
capacity_test_one( const Bitset & lhs )
{
// empty bitset
Bitset b( lhs );
BOOST_TEST( b.capacity() == 0 );
}
static void
capacity_test_two( const Bitset & lhs )
{
// bitset constructed with size "100"
Bitset b( lhs );
BOOST_TEST( b.capacity() >= 100 );
b.resize( 200 );
BOOST_TEST( b.capacity() >= 200 );
}
@@ -958,7 +864,7 @@ struct bitset_test
Bitset b( lhs );
b.shrink_to_fit();
BOOST_TEST( b.size() == 0 );
BOOST_TEST( b.capacity() == Bitset().capacity() );
BOOST_TEST( b.capacity() == 0 );
}
static void
@@ -969,11 +875,11 @@ struct bitset_test
b.shrink_to_fit();
BOOST_TEST( b.capacity() >= 100 );
BOOST_TEST( b.size() == 100 );
b.reserve( 550 );
BOOST_TEST( b.capacity() >= 550 );
b.reserve( 200 );
BOOST_TEST( b.capacity() >= 200 );
BOOST_TEST( b.size() == 100 );
b.shrink_to_fit();
BOOST_TEST( b.capacity() < 550 );
BOOST_TEST( b.capacity() < 200 );
BOOST_TEST( b.size() == 100 );
}
@@ -1088,34 +994,26 @@ struct bitset_test
}
static void
find_first( const Bitset & b, typename Bitset::size_type offset = 0, bool value = true )
find_first( const Bitset & b, typename Bitset::size_type offset = 0 )
{
const typename Bitset::size_type result = value
? b.find_first( offset )
: b.find_first_off( offset );
// find first bit with value `value` from offset onwards, if any
// find first non-null bit from offset onwards, if any
typename Bitset::size_type i = offset;
while ( i < b.size() && b[ i ] != value )
while ( i < b.size() && b[ i ] == 0 )
++i;
if ( i >= b.size() )
BOOST_TEST( result == Bitset::npos ); // not found;
BOOST_TEST( b.find_first( offset ) == Bitset::npos ); // not found;
else {
BOOST_TEST( result == i );
BOOST_TEST( b.test( i ) == value );
BOOST_TEST( b.find_first( offset ) == i );
BOOST_TEST( b.test( i ) == true );
}
}
static void
find_pos( const Bitset & b, typename Bitset::size_type pos, bool value = true )
find_pos( const Bitset & b, typename Bitset::size_type pos )
{
find_first( b, pos, value);
if ( value ) {
BOOST_TEST( next_bit_on( b, pos ) == b.find_next( pos ) );
} else {
BOOST_TEST( next_bit_off( b, pos ) == b.find_next_off( pos ) );
}
find_first( b, pos );
BOOST_TEST( next_bit_on( b, pos ) == b.find_next( pos ) );
}
static void
@@ -1151,7 +1049,6 @@ struct bitset_test
BOOST_TEST( diff );
}
} else {
BOOST_TEST( a.size() == b.size() );
for ( std::size_t I = 0; I < a.size(); ++I )
BOOST_TEST( a[ I ] == b[ I ] );
}
@@ -1184,7 +1081,7 @@ struct bitset_test
return false;
// if (a[i] = b[j]) skip to next
}
return a.size() < b.size();
return ( a.size() < b.size() );
}
}
@@ -1209,32 +1106,6 @@ struct bitset_test
return i == b.size() ? Bitset::npos : i;
}
static typename Bitset::size_type
next_bit_off( const Bitset & b, typename Bitset::size_type prev )
{
// helper function for find_pos()
//
if ( b.all() || prev == Bitset::npos ) {
return Bitset::npos;
}
++prev;
if ( prev >= b.size() ) {
return Bitset::npos;
}
typename Bitset::size_type i = prev;
while ( i < b.size() && b[ i ] ) {
++i;
}
return i == b.size()
? Bitset::npos
: i;
}
static void
operator_less_than( const Bitset & a, const Bitset & b )
{
@@ -1484,6 +1355,8 @@ struct bitset_test
} else {
if ( ! did_throw )
BOOST_TEST( s.width() == 0 );
// This test require that os be an output _and_ input stream.
// Of course dynamic_bitset's operator << doesn't require that.
size_type total_len = w <= 0 || static_cast< size_type >( w ) < b.size() ? b.size() : static_cast< size_type >( w );
const string_type padding( total_len - b.size(), fill_char );
@@ -1604,7 +1477,27 @@ struct bitset_test
BOOST_TEST( ! has_flags( is, std::ios::failbit ) );
if ( num_digits == 0 && after_digits == len ) {
// The VC6 library has a bug/non-conformity in the sentry
// constructor. It uses code like
// // skip whitespaces...
// int_type _C = rdbuf()->sgetc();
// while (!_Tr::eq_int_type(_Tr::eof(), _C) ...
//
// For an empty file the while statement is never "entered"
// and the stream remains in good() state; thus the sentry
// object gives "true" when converted to bool. This is worse
// than the case above, because not only failbit is not set,
// but no bit is set at all, end we end up clearing the
// bitset though there's nothing in the file to be extracted.
// Note that the dynamic_bitset docs say a sentry object is
// constructed and then converted to bool, thus we rely on
// what the underlying library does.
//
#if ! defined( BOOST_DINKUMWARE_STDLIB ) || ( BOOST_DINKUMWARE_STDLIB >= 306 )
BOOST_TEST( b == a_copy );
#else
BOOST_TEST( b.empty() == true );
#endif
} else {
String sub = str.substr( after_spaces, num_digits );
BOOST_TEST( b == Bitset( sub ) );

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2025 Gennaro Prota
// Copyright (c) 2003-2006 Gennaro Prota
// Copyright (c) 2014 Ahmed Charles
// Copyright (c) 2014 Riccardo Marcangelo
//
@@ -15,14 +15,14 @@
#include "bitset_test.hpp"
#include "boost/config.hpp"
#include "boost/config/workaround.hpp"
#include "boost/dynamic_bitset/dynamic_bitset.hpp"
#include "boost/limits.hpp"
#if ! defined( BOOST_NO_CXX11_ALLOCATOR )
# include <cstdlib>
# include <new>
template< typename T >
template< class T >
class minimal_allocator
{
public:
@@ -57,9 +57,15 @@ public:
#define BOOST_BITSET_TEST_COUNT( x ) ( sizeof( x ) / sizeof( x[ 0 ] ) )
// Codewarrior 8.3 for Win fails without this.
// Thanks Howard Hinnant ;)
#if defined __MWERKS__ && BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) // 8.x
# pragma parse_func_templ off
#endif
template< typename Tests, typename String >
void
run_string_tests( const String & s )
run_string_tests( const String & s BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE( Tests ) )
{
const std::size_t len = s.length();
const std::size_t step = len / 4 ? len / 4 : 1;
@@ -85,7 +91,8 @@ run_string_tests( const String & s )
// tests the do-the-right-thing constructor dispatch
template< typename Tests, typename T >
void
run_numeric_ctor_tests()
run_numeric_ctor_tests( BOOST_EXPLICIT_TEMPLATE_TYPE( Tests )
BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE( T ) )
{
const int bits_per_block = Tests::bits_per_block;
const int width = std::numeric_limits< T >::digits;
@@ -125,12 +132,11 @@ run_numeric_ctor_tests()
}
}
template< typename Block, typename AllocatorOrContainer = std::allocator< Block > >
template< typename Block >
void
run_test_cases()
run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
typedef boost::dynamic_bitset< Block, AllocatorOrContainer >
bitset_type;
typedef boost::dynamic_bitset< Block > bitset_type;
typedef bitset_test< bitset_type > Tests;
const int bits_per_block = bitset_type::bits_per_block;
@@ -171,13 +177,16 @@ run_test_cases()
run_numeric_ctor_tests< Tests, short int >();
run_numeric_ctor_tests< Tests, int >();
run_numeric_ctor_tests< Tests, long int >();
run_numeric_ctor_tests< Tests, long long >();
run_numeric_ctor_tests< Tests, unsigned char >();
run_numeric_ctor_tests< Tests, unsigned short >();
run_numeric_ctor_tests< Tests, unsigned int >();
run_numeric_ctor_tests< Tests, unsigned long >();
run_numeric_ctor_tests< Tests, unsigned long long >();
#if defined( BOOST_HAS_LONG_LONG )
run_numeric_ctor_tests< Tests, ::boost::long_long_type >();
run_numeric_ctor_tests< Tests, ::boost::ulong_long_type >();
#endif
}
//=====================================================================
// Test construction from a string
@@ -223,34 +232,6 @@ run_test_cases()
blocks[ i ] = static_cast< Block >( i );
Tests::from_block_range( blocks );
}
//=====================================================================
// test iterators
{
bitset_type b;
Tests::iterate_forward( b );
Tests::iterate_backward( b );
Tests::iterator_operations( b );
}
{
bitset_type b( 1, 1ul );
Tests::iterate_forward( b );
Tests::iterate_backward( b );
Tests::iterator_operations( b );
}
{
bitset_type b( bitset_type::bits_per_block, 100ul );
Tests::iterate_forward( b );
Tests::iterate_backward( b );
Tests::iterator_operations( b );
}
{
bitset_type b( long_string );
Tests::iterate_forward( b );
Tests::iterate_backward( b );
Tests::iterator_operations( b );
}
//=====================================================================
// test to_block_range
{
@@ -269,15 +250,15 @@ run_test_cases()
//=====================================================================
// Test copy constructor
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::copy_constructor( b );
}
{
bitset_type b( "0" );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::copy_constructor( b );
}
{
bitset_type b ( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::copy_constructor( b );
}
//=====================================================================
@@ -287,7 +268,7 @@ run_test_cases()
Tests::copy_assignment_operator( a, b );
}
{
bitset_type a( "1" ), b( "0" );
bitset_type a( std::string( "1" ) ), b( std::string( "0" ) );
Tests::copy_assignment_operator( a, b );
}
{
@@ -300,23 +281,24 @@ run_test_cases()
Tests::copy_assignment_operator( a, b );
}
{
bitset_type a( "0" );
bitset_type a( std::string( "0" ) );
bitset_type b( long_string ); // b greater than a
Tests::copy_assignment_operator( a, b );
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//=====================================================================
// Test move constructor
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::move_constructor( b );
}
{
bitset_type b( "0" );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::move_constructor( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::move_constructor( b );
}
//=====================================================================
@@ -326,7 +308,7 @@ run_test_cases()
Tests::move_assignment_operator( a, b );
}
{
bitset_type a( "1" ), b( "0" );
bitset_type a( std::string( "1" ) ), b( std::string( "0" ) );
Tests::move_assignment_operator( a, b );
}
{
@@ -339,15 +321,16 @@ run_test_cases()
Tests::move_assignment_operator( a, b );
}
{
bitset_type a( "0" );
bitset_type a( std::string( "0" ) );
bitset_type b( long_string ); // b greater than a
Tests::move_assignment_operator( a, b );
}
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
//=====================================================================
// Test swap
{
bitset_type a;
bitset_type b( "1" );
bitset_type b( std::string( "1" ) );
Tests::swap( a, b );
Tests::swap( b, a );
Tests::swap( a, a );
@@ -359,7 +342,7 @@ run_test_cases()
Tests::swap( b, a );
}
{
bitset_type a( "0" );
bitset_type a( std::string( "0" ) );
bitset_type b( long_string );
Tests::swap( a, b );
Tests::swap( b, a );
@@ -369,163 +352,121 @@ run_test_cases()
//=====================================================================
// Test resize
{
bitset_type a;
boost::dynamic_bitset< Block > a;
Tests::resize( a );
}
{
bitset_type a( "0" );
boost::dynamic_bitset< Block > a( std::string( "0" ) );
Tests::resize( a );
}
{
bitset_type a( "1" );
boost::dynamic_bitset< Block > a( std::string( "1" ) );
Tests::resize( a );
}
{
bitset_type a( long_string );
boost::dynamic_bitset< Block > a( long_string );
Tests::resize( a );
}
//=====================================================================
// Test clear
{
bitset_type a;
boost::dynamic_bitset< Block > a;
Tests::clear( a );
}
{
bitset_type a( long_string );
boost::dynamic_bitset< Block > a( long_string );
Tests::clear( a );
}
//=====================================================================
// Test pop back
{
bitset_type a( "01" );
boost::dynamic_bitset< Block > a( std::string( "01" ) );
Tests::pop_back( a );
}
{
bitset_type a( "10" );
boost::dynamic_bitset< Block > a( std::string( "10" ) );
Tests::pop_back( a );
}
{
const int size_to_fill_all_blocks = 4 * bits_per_block;
bitset_type a( size_to_fill_all_blocks, 255ul );
const int size_to_fill_all_blocks = 4 * bits_per_block;
boost::dynamic_bitset< Block > a( size_to_fill_all_blocks, 255ul );
Tests::pop_back( a );
}
{
bitset_type a( long_string.c_str() );
boost::dynamic_bitset< Block > a( long_string );
Tests::pop_back( a );
}
//=====================================================================
// Test pop_front
{
bitset_type a( "01" );
Tests::pop_front( a );
}
{
bitset_type a( "10" );
Tests::pop_front( a );
}
{
const int size_to_fill_all_blocks = 4 * bits_per_block;
bitset_type a( size_to_fill_all_blocks, 255ul );
Tests::pop_front( a );
}
{
bitset_type a( long_string.c_str() );
Tests::pop_front( a );
}
//=====================================================================
// Test append bit
{
bitset_type a;
boost::dynamic_bitset< Block > a;
Tests::append_bit( a );
}
{
bitset_type a( "0" );
boost::dynamic_bitset< Block > a( std::string( "0" ) );
Tests::append_bit( a );
}
{
bitset_type a( "1" );
boost::dynamic_bitset< Block > a( std::string( "1" ) );
Tests::append_bit( a );
}
{
const int size_to_fill_all_blocks = 4 * bits_per_block;
bitset_type a( size_to_fill_all_blocks, 255ul );
const int size_to_fill_all_blocks = 4 * bits_per_block;
boost::dynamic_bitset< Block > a( size_to_fill_all_blocks, 255ul );
Tests::append_bit( a );
}
{
bitset_type a( long_string );
boost::dynamic_bitset< Block > a( long_string );
Tests::append_bit( a );
}
//=====================================================================
// Test push_front
{
bitset_type a;
Tests::prepend_bit( a );
}
{
bitset_type a( "0" );
Tests::prepend_bit( a );
}
{
bitset_type a( "1" );
Tests::prepend_bit( a );
}
{
const int size_to_fill_all_blocks = 4 * bits_per_block;
bitset_type a( size_to_fill_all_blocks, 255ul );
Tests::prepend_bit( a );
}
{
bitset_type a( long_string );
Tests::prepend_bit( a );
}
//=====================================================================
// Test append block
{
bitset_type a;
boost::dynamic_bitset< Block > a;
Tests::append_block( a );
}
{
bitset_type a( "0" );
boost::dynamic_bitset< Block > a( std::string( "0" ) );
Tests::append_block( a );
}
{
bitset_type a( "1" );
boost::dynamic_bitset< Block > a( std::string( "1" ) );
Tests::append_block( a );
}
{
const int size_to_fill_all_blocks = 4 * bits_per_block;
bitset_type a( size_to_fill_all_blocks, 15ul );
const int size_to_fill_all_blocks = 4 * bits_per_block;
boost::dynamic_bitset< Block > a( size_to_fill_all_blocks, 15ul );
Tests::append_block( a );
}
{
bitset_type a( long_string.c_str() );
boost::dynamic_bitset< Block > a( long_string );
Tests::append_block( a );
}
//=====================================================================
// Test append block range
{
bitset_type a;
std::vector< Block > blocks;
boost::dynamic_bitset< Block > a;
std::vector< Block > blocks;
Tests::append_block_range( a, blocks );
}
{
bitset_type a( "0" );
std::vector< Block > blocks( 3 );
boost::dynamic_bitset< Block > a( std::string( "0" ) );
std::vector< Block > blocks( 3 );
blocks[ 0 ] = static_cast< Block >( 0 );
blocks[ 1 ] = static_cast< Block >( 1 );
blocks[ 2 ] = all_1s;
Tests::append_block_range( a, blocks );
}
{
bitset_type a( "1" );
const unsigned int n = ( std::numeric_limits< unsigned char >::max )();
std::vector< Block > blocks( n );
boost::dynamic_bitset< Block > a( std::string( "1" ) );
const unsigned int n = ( std::numeric_limits< unsigned char >::max )();
std::vector< Block > blocks( n );
for ( typename std::vector< Block >::size_type i = 0; i < n; ++i )
blocks[ i ] = static_cast< Block >( i );
Tests::append_block_range( a, blocks );
}
{
bitset_type a;
boost::dynamic_bitset< Block > a;
a.append( Block( 1 ) );
a.append( Block( 2 ) );
Block x[] = { 3, 4, 5 };
@@ -534,42 +475,29 @@ run_test_cases()
Tests::append_block_range( a, blocks );
}
{
bitset_type a( long_string.c_str() );
std::vector< Block > blocks( 3 );
boost::dynamic_bitset< Block > a( long_string );
std::vector< Block > blocks( 3 );
blocks[ 0 ] = static_cast< Block >( 0 );
blocks[ 1 ] = static_cast< Block >( 1 );
blocks[ 2 ] = all_1s;
Tests::append_block_range( a, blocks );
}
// Test with input iterators
{
bitset_type b;
Tests::append_block_range_input_iter( b );
}
{
bitset_type b( "0" );
Tests::append_block_range_input_iter( b );
}
{
bitset_type b( long_string.c_str() );
Tests::append_block_range_input_iter( b );
}
//=====================================================================
// Test bracket operator
{
bitset_type b1;
std::vector< bool > bitvec1;
boost::dynamic_bitset< Block > b1;
std::vector< bool > bitvec1;
Tests::operator_bracket( b1, bitvec1 );
}
{
bitset_type b( "1" );
std::vector< bool > bit_vec( 1, true );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
std::vector< bool > bit_vec( 1, true );
Tests::operator_bracket( b, bit_vec );
}
{
bitset_type b( long_string.c_str() );
std::size_t n = long_string.size();
std::vector< bool > bit_vec( n );
boost::dynamic_bitset< Block > b( long_string );
std::size_t n = long_string.size();
std::vector< bool > bit_vec( n );
for ( std::size_t i = 0; i < n; ++i )
bit_vec[ i ] = long_string[ n - 1 - i ] == '0' ? 0 : 1;
Tests::operator_bracket( b, bit_vec );
@@ -577,25 +505,23 @@ run_test_cases()
//=====================================================================
// Test at
{
bitset_type b1;
std::vector< bool > bitvec1;
boost::dynamic_bitset< Block > b1;
std::vector< bool > bitvec1;
Tests::at( b1, bitvec1 );
}
{
bitset_type b( "1" );
std::vector< bool > bit_vec( 1, true );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
std::vector< bool > bit_vec( 1, true );
Tests::at( b, bit_vec );
}
{
bitset_type b( long_string.c_str() );
std::size_t n = long_string.size();
std::vector< bool > bit_vec( n );
boost::dynamic_bitset< Block > b( long_string );
std::size_t n = long_string.size();
std::vector< bool > bit_vec( n );
for ( std::size_t i = 0; i < n; ++i )
bit_vec[ i ] = long_string[ n - 1 - i ] == '0' ? 0 : 1;
Tests::at( b, bit_vec );
}
//=====================================================================
// Test max_size
#if ! defined( BOOST_NO_CXX11_ALLOCATOR )
{
typedef boost::dynamic_bitset< Block, minimal_allocator< Block > > Bitset;
@@ -603,14 +529,9 @@ run_test_cases()
bitset_test< Bitset >::max_size( b );
}
#endif
{
typedef boost::dynamic_bitset< Block, small_vector< Block > > Bitset;
Bitset b;
bitset_test< Bitset >::max_size( b );
}
// Test copy-initialize with default constructor
{
bitset_type b[ 1 ] = {};
boost::dynamic_bitset< Block > b[ 1 ] = {};
(void)b;
}
}
@@ -619,15 +540,12 @@ int
main()
{
run_test_cases< unsigned char >();
run_test_cases< unsigned char, small_vector< unsigned char > >();
run_test_cases< unsigned short >();
run_test_cases< unsigned short, small_vector< unsigned short > >();
run_test_cases< unsigned int >();
run_test_cases< unsigned int, small_vector< unsigned int > >();
run_test_cases< unsigned long >();
run_test_cases< unsigned long, small_vector< unsigned long > >();
run_test_cases< unsigned long long >();
run_test_cases< unsigned long long, small_vector< unsigned long long > >();
#ifdef BOOST_HAS_LONG_LONG
run_test_cases< ::boost::ulong_long_type >();
#endif
return boost::report_errors();
}

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2025 Gennaro Prota
// Copyright (c) 2003-2006 Gennaro Prota
// Copyright (c) 2014 Ahmed Charles
// Copyright (c) 2018 Evgeny Shulgin
//
@@ -11,88 +11,89 @@
// -----------------------------------------------------------
#include "bitset_test.hpp"
#include "boost/config.hpp"
#include "boost/dynamic_bitset/dynamic_bitset.hpp"
template< typename Block, typename AllocatorOrContainer = std::allocator< Block > >
template< typename Block >
void
run_test_cases()
run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
typedef boost::dynamic_bitset< Block, AllocatorOrContainer > bitset_type;
typedef boost::dynamic_bitset< Block > bitset_type;
typedef bitset_test< bitset_type > Tests;
const int bits_per_block = bitset_type::bits_per_block;
const std::string long_string = get_long_string();
std::string long_string = get_long_string();
//=====================================================================
// Test operator&=
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::and_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::and_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::and_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::and_assignment( lhs, rhs );
}
//=====================================================================
// Test operator |=
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::or_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::or_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::or_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::or_assignment( lhs, rhs );
}
//=====================================================================
// Test operator^=
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::xor_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::xor_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "0" ) ), rhs( std::string( "1" ) );
boost::dynamic_bitset< Block > lhs( std::string( "0" ) ), rhs( std::string( "1" ) );
Tests::xor_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string ), rhs( long_string );
Tests::xor_assignment( lhs, rhs );
}
//=====================================================================
// Test operator-=
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::sub_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::sub_assignment( lhs, rhs );
}
{
bitset_type lhs( std::string( "0" ) ), rhs( std::string( "1" ) );
boost::dynamic_bitset< Block > lhs( std::string( "0" ) ), rhs( std::string( "1" ) );
Tests::sub_assignment( lhs, rhs );
}
{
bitset_type lhs( long_string ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string ), rhs( long_string );
Tests::sub_assignment( lhs, rhs );
}
//=====================================================================
@@ -100,15 +101,15 @@ run_test_cases()
{ // case pos == 0
std::size_t pos = 0;
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::shift_left_assignment( b, pos );
}
{
bitset_type b( std::string( "1010" ) );
boost::dynamic_bitset< Block > b( std::string( "1010" ) );
Tests::shift_left_assignment( b, pos );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_left_assignment( b, pos );
}
}
@@ -119,7 +120,7 @@ run_test_cases()
for ( int i = 1; i <= how_many; ++i ) {
std::size_t multiple = i * bits_per_block;
std::size_t non_multiple = multiple - 1;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_left_assignment( b, multiple );
Tests::shift_left_assignment( b, non_multiple );
@@ -127,12 +128,12 @@ run_test_cases()
}
{ // case pos == size()/2
std::size_t pos = long_string.size() / 2;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_left_assignment( b, pos );
}
{ // case pos >= n
std::size_t pos = long_string.size();
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_left_assignment( b, pos );
}
//=====================================================================
@@ -140,15 +141,15 @@ run_test_cases()
{ // case pos == 0
std::size_t pos = 0;
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::shift_right_assignment( b, pos );
}
{
bitset_type b( std::string( "1010" ) );
boost::dynamic_bitset< Block > b( std::string( "1010" ) );
Tests::shift_right_assignment( b, pos );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_right_assignment( b, pos );
}
}
@@ -159,7 +160,7 @@ run_test_cases()
for ( int i = 1; i <= how_many; ++i ) {
std::size_t multiple = i * bits_per_block;
std::size_t non_multiple = multiple - 1;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_right_assignment( b, multiple );
Tests::shift_right_assignment( b, non_multiple );
@@ -167,204 +168,197 @@ run_test_cases()
}
{ // case pos == size()/2
std::size_t pos = long_string.size() / 2;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_right_assignment( b, pos );
}
{ // case pos >= n
std::size_t pos = long_string.size();
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::shift_right_assignment( b, pos );
}
//=====================================================================
// test b.set()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::set_all( b );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::set_all( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_all( b );
}
//=====================================================================
// Test b.set(pos)
{ // case pos >= b.size()
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::set_one( b, 0, true );
Tests::set_one( b, 0, false );
}
{ // case pos < b.size()
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::set_one( b, 0, true );
Tests::set_one( b, 0, false );
}
{ // case pos == b.size() / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_one( b, long_string.size() / 2, true );
Tests::set_one( b, long_string.size() / 2, false );
}
//=====================================================================
// Test b.set(pos, len)
// case size is 0
{
bitset_type b( std::string( "10" ) ) ;
Tests::set_segment( b, 0, 0, true );
Tests::set_segment( b, 0, 0, false );
}
{ // case size is 1
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::set_segment( b, 0, 1, true );
Tests::set_segment( b, 0, 1, false );
}
{ // case fill the whole set
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_segment( b, 0, b.size(), true );
Tests::set_segment( b, 0, b.size(), false );
}
{ // case pos = size / 4, len = size / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_segment( b, b.size() / 4, b.size() / 2, true );
Tests::set_segment( b, b.size() / 4, b.size() / 2, false );
}
{ // case pos = block_size / 2, len = size - block_size
bitset_type b( long_string );
Tests::set_segment( b, bitset_type::bits_per_block / 2, b.size() - bitset_type::bits_per_block, true );
Tests::set_segment( b, bitset_type::bits_per_block / 2, b.size() - bitset_type::bits_per_block, false );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_segment( b, boost::dynamic_bitset< Block >::bits_per_block / 2, b.size() - boost::dynamic_bitset< Block >::bits_per_block, true );
Tests::set_segment( b, boost::dynamic_bitset< Block >::bits_per_block / 2, b.size() - boost::dynamic_bitset< Block >::bits_per_block, false );
}
{ // case pos = 1, len = size - 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_segment( b, 1, b.size() - 2, true );
Tests::set_segment( b, 1, b.size() - 2, false );
}
{ // case pos = 3, len = 7
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::set_segment( b, 3, 7, true );
Tests::set_segment( b, 3, 7, false );
}
//=====================================================================
// Test b.reset()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::reset_all( b );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::reset_all( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_all( b );
}
//=====================================================================
// Test b.reset(pos)
{ // case pos >= b.size()
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::reset_one( b, 0 );
}
{ // case pos < b.size()
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::reset_one( b, 0 );
}
{ // case pos == b.size() / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_one( b, long_string.size() / 2 );
}
//=====================================================================
// Test b.reset(pos, len)
{ // case size is 1
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::reset_segment( b, 0, 1 );
}
{ // case fill the whole set
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_segment( b, 0, b.size() );
}
{ // case pos = size / 4, len = size / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_segment( b, b.size() / 4, b.size() / 2 );
}
{ // case pos = block_size / 2, len = size - block_size
bitset_type b( long_string );
Tests::reset_segment( b, bitset_type::bits_per_block / 2, b.size() - bitset_type::bits_per_block );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_segment( b, boost::dynamic_bitset< Block >::bits_per_block / 2, b.size() - boost::dynamic_bitset< Block >::bits_per_block );
}
{ // case pos = 1, len = size - 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_segment( b, 1, b.size() - 2 );
}
{ // case pos = 3, len = 7
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::reset_segment( b, 3, 7 );
}
//=====================================================================
// Test ~b
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::operator_flip( b );
}
{
bitset_type b( std::string( "1" ) );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
Tests::operator_flip( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::operator_flip( b );
}
//=====================================================================
// Test b.flip()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::flip_all( b );
}
{
bitset_type b( std::string( "1" ) );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
Tests::flip_all( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_all( b );
}
//=====================================================================
// Test b.flip(pos)
{ // case pos >= b.size()
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::flip_one( b, 0 );
}
{ // case pos < b.size()
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::flip_one( b, 0 );
}
{ // case pos == b.size() / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_one( b, long_string.size() / 2 );
}
//=====================================================================
// Test b.flip(pos, len)
{ // case size is 1
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::flip_segment( b, 0, 1 );
}
{ // case fill the whole set
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_segment( b, 0, b.size() );
}
{ // case pos = size / 4, len = size / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_segment( b, b.size() / 4, b.size() / 2 );
}
{ // case pos = block_size / 2, len = size - block_size
bitset_type b( long_string );
Tests::flip_segment( b, bitset_type::bits_per_block / 2, b.size() - bitset_type::bits_per_block );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_segment( b, boost::dynamic_bitset< Block >::bits_per_block / 2, b.size() - boost::dynamic_bitset< Block >::bits_per_block );
}
{ // case pos = 1, len = size - 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_segment( b, 1, b.size() - 2 );
}
{ // case pos = 3, len = 7
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::flip_segment( b, 3, 7 );
}
}
@@ -373,15 +367,12 @@ int
main()
{
run_test_cases< unsigned char >();
run_test_cases< unsigned char, small_vector< unsigned char > >();
run_test_cases< unsigned short >();
run_test_cases< unsigned short, small_vector< unsigned short > >();
run_test_cases< unsigned int >();
run_test_cases< unsigned int, small_vector< unsigned int > >();
run_test_cases< unsigned long >();
run_test_cases< unsigned long, small_vector< unsigned long > >();
run_test_cases< unsigned long long >();
run_test_cases< unsigned long long, small_vector< unsigned long long > >();
#ifdef BOOST_HAS_LONG_LONG
run_test_cases< ::boost::ulong_long_type >();
#endif
return boost::report_errors();
}

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2025 Gennaro Prota
// Copyright (c) 2003-2006 Gennaro Prota
// Copyright (c) 2014 Ahmed Charles
// Copyright (c) 2014 Riccardo Marcangelo
//
@@ -11,21 +11,22 @@
// -----------------------------------------------------------
#include "bitset_test.hpp"
#include "boost/config.hpp"
#include "boost/dynamic_bitset/dynamic_bitset.hpp"
#include "boost/limits.hpp"
#include <assert.h>
template< typename Block, typename AllocatorOrContainer = std::allocator< Block > >
template< typename Block >
void
run_test_cases()
run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
// a bunch of typedefs which will be handy later on
typedef boost::dynamic_bitset< Block, AllocatorOrContainer > bitset_type;
typedef boost::dynamic_bitset< Block > bitset_type;
typedef bitset_test< bitset_type > Tests;
// typedef typename bitset_type::size_type size_type; // unusable with Borland 5.5.1
const std::string long_string = get_long_string();
const std::size_t ul_width = std::numeric_limits< unsigned long >::digits;
std::string long_string = get_long_string();
std::size_t ul_width = std::numeric_limits< unsigned long >::digits;
//=====================================================================
// Test b.empty()
@@ -44,129 +45,129 @@ run_test_cases()
//=====================================================================
// Test b.to_long()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::to_ulong( b );
}
{
bitset_type b( std::string( "1" ) );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
Tests::to_ulong( b );
}
{
bitset_type b( bitset_type::bits_per_block, static_cast< unsigned long >( -1 ) );
boost::dynamic_bitset< Block > b( bitset_type::bits_per_block, static_cast< unsigned long >( -1 ) );
Tests::to_ulong( b );
}
{
std::string str( ul_width - 1, '1' );
bitset_type b( str );
boost::dynamic_bitset< Block > b( str );
Tests::to_ulong( b );
}
{
std::string ul_str( ul_width, '1' );
bitset_type b( ul_str );
boost::dynamic_bitset< Block > b( ul_str );
Tests::to_ulong( b );
}
{ // case overflow
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::to_ulong( b );
}
//=====================================================================
// Test to_string(b, str)
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::to_string( b );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::to_string( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::to_string( b );
}
//=====================================================================
// Test b.count()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::count( b );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::count( b );
}
{
bitset_type b( std::string( "1" ) );
boost::dynamic_bitset< Block > b( std::string( "1" ) );
Tests::count( b );
}
{
bitset_type b( 8, 255ul );
boost::dynamic_bitset< Block > b( 8, 255ul );
Tests::count( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::count( b );
}
//=====================================================================
// Test b.size()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::size( b );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::size( b );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::size( b );
}
//=====================================================================
// Test b.capacity()
{
bitset_type b;
Tests::capacity( b );
boost::dynamic_bitset< Block > b;
Tests::capacity_test_one( b );
}
{
bitset_type b( 100 );
Tests::capacity( b );
boost::dynamic_bitset< Block > b( 100 );
Tests::capacity_test_two( b );
}
//=====================================================================
// Test b.reserve()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::reserve_test_one( b );
}
{
bitset_type b( 100 );
boost::dynamic_bitset< Block > b( 100 );
Tests::reserve_test_two( b );
}
//=====================================================================
// Test b.shrink_to_fit()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::shrink_to_fit_test_one( b );
}
{
bitset_type b( 100 );
boost::dynamic_bitset< Block > b( 100 );
Tests::shrink_to_fit_test_two( b );
}
//=====================================================================
// Test b.all()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::all( b );
Tests::all( ~b );
Tests::all( b.set() );
Tests::all( b.reset() );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::all( b );
Tests::all( ~b );
Tests::all( b.set() );
Tests::all( b.reset() );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::all( b );
Tests::all( ~b );
Tests::all( b.set() );
@@ -175,21 +176,21 @@ run_test_cases()
//=====================================================================
// Test b.any()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::any( b );
Tests::any( ~b );
Tests::any( b.set() );
Tests::any( b.reset() );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::any( b );
Tests::any( ~b );
Tests::any( b.set() );
Tests::any( b.reset() );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::any( b );
Tests::any( ~b );
Tests::any( b.set() );
@@ -198,21 +199,21 @@ run_test_cases()
//=====================================================================
// Test b.none()
{
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::none( b );
Tests::none( ~b );
Tests::none( b.set() );
Tests::none( b.reset() );
}
{
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::none( b );
Tests::none( ~b );
Tests::none( b.set() );
Tests::none( b.reset() );
}
{
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::none( b );
Tests::none( ~b );
Tests::none( b.set() );
@@ -221,56 +222,56 @@ run_test_cases()
//=====================================================================
// Test a.is_subset_of(b)
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::subset( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::subset( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::subset( a, b );
}
//=====================================================================
// Test a.is_proper_subset_of(b)
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::proper_subset( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::proper_subset( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::proper_subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::proper_subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::proper_subset( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::proper_subset( a, b );
}
@@ -304,37 +305,30 @@ run_test_cases()
// empty bitset
bitset_type b;
Tests::find_first( b );
Tests::find_first( b, 0, false );
}
{
// bitset of size 1
bitset_type b( 1, 1ul );
Tests::find_first( b );
Tests::find_first( b, 0, false );
}
{
// all-0s bitset
bitset_type b( 4 * bitset_type::bits_per_block, 0ul );
Tests::find_first( b );
Tests::find_first( b, 0, false );
}
{
// first bit on or off
// first bit on
bitset_type b( 1, 1ul );
Tests::find_first( b );
b.set( 0, false );
Tests::find_first( b, 0, false );
}
{
// last bit on or off
// last bit on
bitset_type b( 4 * bitset_type::bits_per_block - 1, 0ul );
b.set( b.size() - 1 );
Tests::find_first( b );
b.set( b.size() - 1, false );
Tests::find_first( b, 0, false );
}
//=====================================================================
// Test find_next, find_next_off, offset find_first and offset find_first_off
// Test find_next and offset find_first
{
// empty bitset
bitset_type b;
@@ -344,10 +338,6 @@ run_test_cases()
Tests::find_pos( b, 1 );
Tests::find_pos( b, 200 );
Tests::find_pos( b, b.npos );
Tests::find_pos( b, 0, false );
Tests::find_pos( b, 1, false );
Tests::find_pos( b, 200, false );
Tests::find_pos( b, b.npos, false );
}
{
// bitset of size 1 (find_next can never find)
@@ -358,10 +348,6 @@ run_test_cases()
Tests::find_pos( b, 1 );
Tests::find_pos( b, 200 );
Tests::find_pos( b, b.npos );
Tests::find_pos( b, 0, false );
Tests::find_pos( b, 1, false );
Tests::find_pos( b, 200, false );
Tests::find_pos( b, b.npos, false );
}
{
// all-1s bitset
@@ -372,10 +358,8 @@ run_test_cases()
const typename bitset_type::size_type larger_than_size = 5 + b.size();
for ( typename bitset_type::size_type i = 0; i <= larger_than_size; ++i ) {
Tests::find_pos( b, i );
Tests::find_pos( b, i, false );
}
Tests::find_pos( b, b.npos );
Tests::find_pos( b, b.npos, false );
}
{
// a bitset with 1s at block boundary only
@@ -394,10 +378,8 @@ run_test_cases()
const typename bitset_type::size_type larger_than_size = 5 + b.size();
for ( i = 0; i <= larger_than_size; ++i ) {
Tests::find_pos( b, i );
Tests::find_pos( b, i, false );
}
Tests::find_pos( b, b.npos );
Tests::find_pos( b, b.npos, false );
}
{
// bitset with alternate 1s and 0s
@@ -413,305 +395,294 @@ run_test_cases()
const typename bitset_type::size_type larger_than_size = 5 + b.size();
for ( i = 0; i <= larger_than_size; ++i ) {
Tests::find_pos( b, i );
Tests::find_pos( b, i, false );
}
Tests::find_pos( b, b.npos );
Tests::find_pos( b, b.npos, false );
}
//=====================================================================
// Test operator==
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_equal( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_equal( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_equal( a, b );
}
//=====================================================================
// Test operator!=
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_not_equal( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_not_equal( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_not_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_not_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_not_equal( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_not_equal( a, b );
}
//=====================================================================
// Test operator<
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_less_than( a, b );
}
{
bitset_type a;
bitset_type b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "10" ) ), b( std::string( "11" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "10" ) ), b( std::string( "11" ) );
boost::dynamic_bitset< Block > a( std::string( "101" ) ), b( std::string( "11" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "101" ) ), b( std::string( "11" ) );
boost::dynamic_bitset< Block > a( std::string( "10" ) ), b( std::string( "111" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "10" ) ), b( std::string( "111" ) );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "11" ) ), b( std::string( "111" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
Tests::operator_less_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_less_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_less_than( a, b );
}
// check for consistency with ulong behaviour when the sizes are equal
{
bitset_type a( 3, 4ul ), b( 3, 5ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 5ul );
BOOST_TEST( a < b );
}
{
bitset_type a( 3, 4ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 4ul );
BOOST_TEST( ! ( a < b ) );
}
{
bitset_type a( 3, 5ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 5ul ), b( 3, 4ul );
BOOST_TEST( ! ( a < b ) );
}
// when the sizes are not equal lexicographic compare does not necessarily correspond to ulong behavior
{
bitset_type a( 4, 4ul ), b( 3, 5ul );
boost::dynamic_bitset< Block > a( 4, 4ul ), b( 3, 5ul );
BOOST_TEST( a < b );
}
{
bitset_type a( 3, 4ul ), b( 4, 5ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 4, 5ul );
BOOST_TEST( ! ( a < b ) );
}
{
bitset_type a( 4, 4ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 4, 4ul ), b( 3, 4ul );
BOOST_TEST( a < b );
}
{
bitset_type a( 3, 4ul ), b( 4, 4ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 4, 4ul );
BOOST_TEST( ! ( a < b ) );
}
{
bitset_type a( 4, 5ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 4, 5ul ), b( 3, 4ul );
BOOST_TEST( a < b );
}
{
bitset_type a( 3, 5ul ), b( 4, 4ul );
boost::dynamic_bitset< Block > a( 3, 5ul ), b( 4, 4ul );
BOOST_TEST( ! ( a < b ) );
}
//=====================================================================
// Test operator<=
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_less_than_eq( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_less_than_eq( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_less_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_less_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_less_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_less_than_eq( a, b );
}
// check for consistency with ulong behaviour
{
bitset_type a( 3, 4ul ), b( 3, 5ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 5ul );
BOOST_TEST( a <= b );
}
{
bitset_type a( 3, 4ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 4ul );
BOOST_TEST( a <= b );
}
{
bitset_type a( 3, 5ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 5ul ), b( 3, 4ul );
BOOST_TEST( ! ( a <= b ) );
}
//=====================================================================
// Test operator>
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_greater_than( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_greater_than( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_greater_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_greater_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_greater_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_greater_than( a, b );
}
// check for consistency with ulong behaviour
{
bitset_type a( 3, 4ul ), b( 3, 5ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 5ul );
BOOST_TEST( ! ( a > b ) );
}
{
bitset_type a( 3, 4ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 4ul );
BOOST_TEST( ! ( a > b ) );
}
{
bitset_type a( 3, 5ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 5ul ), b( 3, 4ul );
BOOST_TEST( a > b );
}
//=====================================================================
// Test operator<=
{
bitset_type a, b;
boost::dynamic_bitset< Block > a, b;
Tests::operator_greater_than_eq( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
boost::dynamic_bitset< Block > a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_greater_than_eq( a, b );
}
{
bitset_type a( std::string( "1" ) ), b( std::string( "1" ) );
boost::dynamic_bitset< Block > a( std::string( "1" ) ), b( std::string( "1" ) );
Tests::operator_greater_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
Tests::operator_greater_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
a[ long_string.size() / 2 ].flip();
Tests::operator_greater_than_eq( a, b );
}
{
bitset_type a( long_string ), b( long_string );
boost::dynamic_bitset< Block > a( long_string ), b( long_string );
b[ long_string.size() / 2 ].flip();
Tests::operator_greater_than_eq( a, b );
}
// check for consistency with ulong behaviour
{
bitset_type a( 3, 4ul ), b( 3, 5ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 5ul );
BOOST_TEST( ! ( a >= b ) );
}
{
bitset_type a( 3, 4ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 4ul ), b( 3, 4ul );
BOOST_TEST( a >= b );
}
{
bitset_type a( 3, 5ul ), b( 3, 4ul );
boost::dynamic_bitset< Block > a( 3, 5ul ), b( 3, 4ul );
BOOST_TEST( a >= b );
}
//=====================================================================
// Test b.test(pos)
{ // case pos >= b.size()
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::test_bit( b, 0 );
}
{ // case pos < b.size()
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::test_bit( b, 0 );
}
{ // case pos == b.size() / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::test_bit( b, long_string.size() / 2 );
}
//=====================================================================
// Test b.test_set(pos)
{ // case pos >= b.size()
bitset_type b;
boost::dynamic_bitset< Block > b;
Tests::test_set_bit( b, 0, true );
Tests::test_set_bit( b, 0, false );
}
{ // case pos < b.size()
bitset_type b( std::string( "0" ) );
boost::dynamic_bitset< Block > b( std::string( "0" ) );
Tests::test_set_bit( b, 0, true );
Tests::test_set_bit( b, 0, false );
}
{ // case pos == b.size() / 2
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::test_set_bit( b, long_string.size() / 2, true );
Tests::test_set_bit( b, long_string.size() / 2, false );
}
@@ -719,106 +690,106 @@ run_test_cases()
// Test b << pos
{ // case pos == 0
std::size_t pos = 0;
bitset_type b( std::string( "1010" ) );
boost::dynamic_bitset< Block > b( std::string( "1010" ) );
Tests::operator_shift_left( b, pos );
}
{ // case pos == size()/2
std::size_t pos = long_string.size() / 2;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::operator_shift_left( b, pos );
}
{ // case pos >= n
std::size_t pos = long_string.size();
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::operator_shift_left( b, pos );
}
//=====================================================================
// Test b >> pos
{ // case pos == 0
std::size_t pos = 0;
bitset_type b( std::string( "1010" ) );
boost::dynamic_bitset< Block > b( std::string( "1010" ) );
Tests::operator_shift_right( b, pos );
}
{ // case pos == size()/2
std::size_t pos = long_string.size() / 2;
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::operator_shift_right( b, pos );
}
{ // case pos >= n
std::size_t pos = long_string.size();
bitset_type b( long_string );
boost::dynamic_bitset< Block > b( long_string );
Tests::operator_shift_right( b, pos );
}
//=====================================================================
// Test a & b
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::operator_and( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::operator_and( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::operator_and( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::operator_and( lhs, rhs );
}
//=====================================================================
// Test a | b
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::operator_or( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::operator_or( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::operator_or( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::operator_or( lhs, rhs );
}
//=====================================================================
// Test a^b
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::operator_xor( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::operator_xor( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::operator_xor( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::operator_xor( lhs, rhs );
}
//=====================================================================
// Test a-b
{
bitset_type lhs, rhs;
boost::dynamic_bitset< Block > lhs, rhs;
Tests::operator_sub( lhs, rhs );
}
{
bitset_type lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
boost::dynamic_bitset< Block > lhs( std::string( "1" ) ), rhs( std::string( "0" ) );
Tests::operator_sub( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 0 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 0 ), rhs( long_string );
Tests::operator_sub( lhs, rhs );
}
{
bitset_type lhs( long_string.size(), 1 ), rhs( long_string );
boost::dynamic_bitset< Block > lhs( long_string.size(), 1 ), rhs( long_string );
Tests::operator_sub( lhs, rhs );
}
}
@@ -827,15 +798,12 @@ int
main()
{
run_test_cases< unsigned char >();
run_test_cases< unsigned char, small_vector< unsigned char > >();
run_test_cases< unsigned short >();
run_test_cases< unsigned short, small_vector< unsigned short > >();
run_test_cases< unsigned int >();
run_test_cases< unsigned int, small_vector< unsigned int > >();
run_test_cases< unsigned long >();
run_test_cases< unsigned long, small_vector< unsigned long > >();
run_test_cases< unsigned long long >();
run_test_cases< unsigned long long, small_vector< unsigned long long > >();
#ifdef BOOST_HAS_LONG_LONG
run_test_cases< ::boost::ulong_long_type >();
#endif
return boost::report_errors();
}

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2025 Gennaro Prota
// Copyright (c) 2003-2006 Gennaro Prota
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -10,6 +10,7 @@
#include "bitset_test.hpp"
#include "boost/config.hpp"
#include "boost/config/workaround.hpp"
#include "boost/dynamic_bitset/dynamic_bitset.hpp"
#include <assert.h>
#include <cstddef>
@@ -21,7 +22,7 @@
# include <sstream>
#endif
#if defined BOOST_NO_STD_WSTRING
#if defined BOOST_NO_STD_WSTRING || defined BOOST_NO_STD_LOCALE
# define BOOST_DYNAMIC_BITSET_NO_WCHAR_T_TESTS
#endif
@@ -34,7 +35,7 @@ widen_string( const std::string & str, const std::locale & loc = std::locale() )
if ( len != 0 ) {
typedef std::ctype< wchar_t > ct_type;
typedef std::wstring::traits_type tr_type;
const ct_type & ct = std::use_facet< ct_type >( loc );
const ct_type & ct = BOOST_USE_FACET( ct_type, loc );
result.resize( len );
for ( std::size_t i = 0; i < len; ++i )
@@ -44,11 +45,11 @@ widen_string( const std::string & str, const std::locale & loc = std::locale() )
}
#endif
template< typename Block, typename AllocatorOrContainer = std::allocator< Block > >
template< typename Block >
void
run_test_cases()
run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
typedef boost::dynamic_bitset< Block, AllocatorOrContainer > bitset_type;
typedef boost::dynamic_bitset< Block > bitset_type;
typedef bitset_test< bitset_type > Tests;
//=====================================================================
@@ -299,15 +300,12 @@ int
main()
{
run_test_cases< unsigned char >();
run_test_cases< unsigned char, small_vector< unsigned char > >();
run_test_cases< unsigned short >();
run_test_cases< unsigned short, small_vector< unsigned short > >();
run_test_cases< unsigned int >();
run_test_cases< unsigned int, small_vector< unsigned int > >();
run_test_cases< unsigned long >();
run_test_cases< unsigned long, small_vector< unsigned long > >();
run_test_cases< unsigned long long >();
run_test_cases< unsigned long long, small_vector< unsigned long long > >();
#ifdef BOOST_HAS_LONG_LONG
run_test_cases< ::boost::ulong_long_type >();
#endif
return boost::report_errors();
}

View File

@@ -1,6 +1,6 @@
// -----------------------------------------------------------
// Copyright (c) 2001 Jeremy Siek
// Copyright (c) 2003-2006, 2025 Gennaro Prota
// Copyright (c) 2003-2006 Gennaro Prota
//
// Copyright (c) 2015 Seth Heeren
//
@@ -16,6 +16,7 @@
#include "boost/archive/xml_iarchive.hpp"
#include "boost/archive/xml_oarchive.hpp"
#include "boost/config.hpp"
#include "boost/config/workaround.hpp"
#include "boost/dynamic_bitset/serialization.hpp"
#include "boost/serialization/vector.hpp"
@@ -23,7 +24,7 @@
# include <sstream>
#endif
#if defined BOOST_NO_STD_WSTRING
#if defined BOOST_NO_STD_WSTRING || defined BOOST_NO_STD_LOCALE
# define BOOST_DYNAMIC_BITSET_NO_WCHAR_T_TESTS
#endif
@@ -45,7 +46,7 @@ private:
template< typename Block, typename IArchive, typename OArchive >
void
test_serialization()
test_serialization( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
SerializableType< Block > a;
@@ -76,14 +77,14 @@ test_serialization()
template< typename Block >
void
test_binary_archive()
test_binary_archive( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
test_serialization< Block, boost::archive::binary_iarchive, boost::archive::binary_oarchive >();
}
template< typename Block >
void
test_xml_archive()
test_xml_archive( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
test_serialization< Block, boost::archive::xml_iarchive, boost::archive::xml_oarchive >();
}
@@ -91,7 +92,7 @@ test_xml_archive()
template< typename Block >
void
run_test_cases()
run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE( Block ) )
{
test_binary_archive< Block >();
test_xml_archive< Block >();
@@ -104,7 +105,9 @@ main()
run_test_cases< unsigned short >();
run_test_cases< unsigned int >();
run_test_cases< unsigned long >();
run_test_cases< unsigned long long >();
#ifdef BOOST_HAS_LONG_LONG
run_test_cases< ::boost::ulong_long_type >();
#endif
return boost::report_errors();
}

View File

@@ -1,13 +1,13 @@
//
// Copyright (C) 2019 James E. King III
// Copyright (C) 2025 Gennaro Prota
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include "boost/core/lightweight_test.hpp"
#include "boost/config.hpp"
#include "boost/detail/lightweight_test.hpp"
#include "boost/dynamic_bitset.hpp"
#include <unordered_set>
@@ -18,23 +18,16 @@ main( int, char *[] )
const std::string long_string =
"01001110101110110101011010000000000011110101101111111111";
// Some bitsets with the same size but different underlying vectors.
const bitset_type zeroes( long_string.size(), 0 );
const bitset_type stuff( long_string );
const bitset_type one( long_string.size(), 1 );
// Some bitsets with different sizes but equal underlying vectors.
const bitset_type zeroes2( 2, 0 );
const bitset_type zeroes3( 3, 0 );
bitset_type zeroes( long_string.size(), 0 );
bitset_type stuff( long_string );
bitset_type ones( long_string.size(), 1 );
std::unordered_set< bitset_type > bitsets;
bitsets.insert( zeroes );
bitsets.insert( stuff );
bitsets.insert( one );
bitsets.insert( zeroes2 );
bitsets.insert( zeroes3 );
bitsets.insert( ones );
BOOST_TEST_EQ( bitsets.size(), 5 );
BOOST_TEST_EQ( bitsets.size(), 3 );
return boost::report_errors();
}