Compare commits

...

15 Commits

Author SHA1 Message Date
joaquintides b00e7c4624 fixed cfoa range insert functions to return the number of elements inserted instead of the size of the input range (#344)
* fixed cfoa range insert functions to return the number of elements inserted instead of the size of the input range

* avoided variable shadowing

* fixed calculation error in test

* updated release notes
2026-02-14 18:08:20 +01:00
Braden Ganetsky df2dfe6140 Fix GDB pretty-printers to work with GCC and C++26 (#342) 2026-01-27 20:47:24 +01:00
Peter Dimov 08aa7fe1c3 Update test/cmake_subdir_test 2026-01-23 17:12:01 +02:00
Peter Dimov 33169aaf41 Merge pull request #341 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-01-23 17:08:41 +02:00
Andrey Semashev ba00d17236 Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 19:38:52 +03:00
joaquintides 83395442ab fixed some issues with doc building (#339)
* added cleanup_node_modules_ to target boostrelease

* removed antora_docs.sh
2026-01-08 13:17:05 +01:00
joaquintides d60d9069f0 improved cleanup-node-modules (#337) 2026-01-05 13:15:31 +01:00
Peter Dimov 597276dd9a Fix -Wundef warning in transparent_tests.cpp 2026-01-05 05:26:25 +02:00
Peter Dimov 86521cc4a4 Enable -Wundef in test/Jamfile.v2 2026-01-05 05:26:25 +02:00
Sam Darwin c09d52fe84 Docs: download extension (#332) 2026-01-04 11:18:49 +01:00
joaquintides af47772876 simplified doc/Jamfile.v2 (#336) 2026-01-03 16:50:37 +01:00
Peter Dimov 719e77f113 Merge pull request #317 from boostorg/cmake
Mark natvis file as PUBLIC in CMakeLists.txt
2026-01-01 22:00:48 +02:00
Peter Dimov 8d68f6d22b Merge branch 'feature/gha' into develop 2026-01-01 21:59:24 +02:00
joaquintides c5cd88e2a8 solved https://www.cve.org/CVERecord?id=CVE-2025-64718 (#335) 2026-01-01 19:50:07 +01:00
Braden Ganetsky 009bd32c3d Mark natvis file as PUBLIC in CMakeLists.txt, mirroring the CMake in Boost.Assert 2025-12-31 17:46:15 -06:00
18 changed files with 109 additions and 96 deletions
+21 -5
View File
@@ -23,12 +23,28 @@ target_link_libraries(boost_unordered
Boost::throw_exception
)
if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")
# Add headers and .natvis to project, for better IDE integration
file(GLOB_RECURSE boost_unordered_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_unordered_IDEFILES} PREFIX "Header Files")
list(APPEND boost_unordered_IDEFILES extra/boost_unordered.natvis)
target_sources(boost_unordered PRIVATE ${boost_unordered_IDEFILES})
if(NOT CMAKE_VERSION VERSION_LESS 3.19)
# Using target_sources with PRIVATE or PUBLIC on INTERFACE targets requires 3.19
file(GLOB_RECURSE headers CONFIGURE_DEPENDS include/*.hpp)
target_sources(boost_unordered PRIVATE ${headers})
unset(headers)
if(MSVC)
# Only Visual Studio needs this, but the generator may also be Ninja
target_sources(boost_unordered PUBLIC extra/boost_unordered.natvis)
endif()
# Make IDE project folders match directory structure
get_target_property(sources boost_unordered SOURCES)
source_group(TREE ${PROJECT_SOURCE_DIR} FILES ${sources})
unset(sources)
endif()
+14 -43
View File
@@ -1,57 +1,28 @@
import generate ;
# Copyright 2026 Joaquin M Lopez Munoz
# 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)
import path ;
import property-set ;
import virtual-target ;
path-constant HERE : . ;
make html_ : build_antora.sh : @run-script ;
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/unordered
;
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 * )
path-constant DOC_DIR : . ;
.node_modules = [ path.join $(DOC_DIR) node_modules ] ;
make cleanup_node_modules_ : html_ : @cleanup-node-modules ;
actions cleanup-node-modules
{
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) ;
rm -rf $(.node_modules)
}
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : install ;
explicit boostrelease ;
alias boostrelease : html_ cleanup_node_modules_ ;
explicit boostrelease ;
-9
View File
@@ -1,9 +0,0 @@
#!/bin/bash
set -ex
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
npm ci
npx antora unordered-playbook.yml
+5
View File
@@ -6,6 +6,11 @@
:github-pr-url: https://github.com/boostorg/unordered/pull
:cpp: C++
== Release 1.91.0
* Fixed the returned value of range insertion in concurrent containers
({github-pr-url}/344[PR#344^]).
== Release 1.89.0
* Deprecated `boost::unordered::hash_is_avalanching` is now a using-declaration of
+1 -1
View File
@@ -11,7 +11,7 @@ Copyright (C) 2005-2008 Daniel James
Copyright (C) 2022-2025 Christian Mazakas
Copyright (C) 2022-2025 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz
Copyright (C) 2022-2026 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz
Copyright (C) 2022-2023 Peter Dimov
+14 -3
View File
@@ -4,6 +4,10 @@
"requires": true,
"packages": {
"": {
"name": "doc",
"dependencies": {
"@cppalliance/antora-downloads-extension": "^0.0.2"
},
"devDependencies": {
"@antora/cli": ">=3.1.14",
"@antora/site-generator": ">=3.1.14",
@@ -286,6 +290,12 @@
"yarn": ">=1.1.0"
}
},
"node_modules/@cppalliance/antora-downloads-extension": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/@cppalliance/antora-downloads-extension/-/antora-downloads-extension-0.0.2.tgz",
"integrity": "sha512-2wXahlvRz9J75ZSfzDeP4XpIZiqIm+w/YjmCWJxFPp6oWgP7e8f6ps7HqdtHNGxnK5mG38OjiCFdHjmHYfgbDA==",
"license": "BSL-1.0"
},
"node_modules/@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
@@ -1164,10 +1174,11 @@
}
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
+3
View File
@@ -3,5 +3,8 @@
"@antora/cli": ">=3.1.14",
"@antora/site-generator": ">=3.1.14",
"antora": ">=3.1.14"
},
"dependencies": {
"@cppalliance/antora-downloads-extension": "^0.0.2"
}
}
+4
View File
@@ -12,3 +12,7 @@ ui:
bundle:
url: https://github.com/boostorg/unordered-ui-bundle/raw/c80db72a7ba804256beb36e3a46d9c7df265d8d7/ui-bundle.zip
output_dir: unordered/_
antora:
extensions:
- require: '@cppalliance/antora-downloads-extension'
+9 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2024-2025 Braden Ganetsky
# Copyright 2024-2026 Braden Ganetsky
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
@@ -16,8 +16,14 @@ class BoostUnorderedHelpers:
return n
def maybe_unwrap_foa_element(e):
if f"{e.type.strip_typedefs()}".startswith("boost::unordered::detail::foa::element_type<"):
return e["p"]
# Sometimes the complex typedefs can't be resolved through a pointer
if e.type.strip_typedefs().code == gdb.TYPE_CODE_PTR:
foa_element = e.dereference()
else:
foa_element = e
if f"{foa_element.type.strip_typedefs()}".startswith("boost::unordered::detail::foa::element_type<"):
return foa_element["p"]
else:
return e
@@ -1,7 +1,7 @@
/* Fast open-addressing concurrent hashmap.
*
* Copyright 2023 Christian Mazakas.
* Copyright 2023-2024 Joaquin M Lopez Munoz.
* Copyright 2023-2026 Joaquin M Lopez Munoz.
* 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)
@@ -423,8 +423,8 @@ namespace boost {
size_type insert(InputIterator begin, InputIterator end)
{
size_type count_elements = 0;
for (auto pos = begin; pos != end; ++pos, ++count_elements) {
table_.emplace(*pos);
for (auto pos = begin; pos != end; ++pos) {
if (table_.emplace(*pos)) ++count_elements;
}
return count_elements;
}
@@ -1,7 +1,7 @@
/* Fast open-addressing concurrent hashset.
*
* Copyright 2023 Christian Mazakas.
* Copyright 2023-2024 Joaquin M Lopez Munoz.
* Copyright 2023-2026 Joaquin M Lopez Munoz.
* 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)
@@ -429,8 +429,8 @@ namespace boost {
size_type insert(InputIterator begin, InputIterator end)
{
size_type count_elements = 0;
for (auto pos = begin; pos != end; ++pos, ++count_elements) {
table_.emplace(*pos);
for (auto pos = begin; pos != end; ++pos) {
if (table_.emplace(*pos)) ++count_elements;
}
return count_elements;
}
@@ -1,7 +1,7 @@
/* Fast open-addressing, node-based concurrent hashmap.
*
* Copyright 2023 Christian Mazakas.
* Copyright 2023-2024 Joaquin M Lopez Munoz.
* Copyright 2023-2026 Joaquin M Lopez Munoz.
* 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)
@@ -430,8 +430,8 @@ namespace boost {
size_type insert(InputIterator begin, InputIterator end)
{
size_type count_elements = 0;
for (auto pos = begin; pos != end; ++pos, ++count_elements) {
table_.emplace(*pos);
for (auto pos = begin; pos != end; ++pos) {
if (table_.emplace(*pos)) ++count_elements;
}
return count_elements;
}
@@ -1,7 +1,7 @@
/* Fast open-addressing, node-based concurrent hashset.
*
* Copyright 2023 Christian Mazakas.
* Copyright 2023-2024 Joaquin M Lopez Munoz.
* Copyright 2023-2026 Joaquin M Lopez Munoz.
* 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)
@@ -436,8 +436,8 @@ namespace boost {
size_type insert(InputIterator begin, InputIterator end)
{
size_type count_elements = 0;
for (auto pos = begin; pos != end; ++pos, ++count_elements) {
table_.emplace(*pos);
for (auto pos = begin; pos != end; ++pos) {
if (table_.emplace(*pos)) ++count_elements;
}
return count_elements;
}
@@ -1,8 +1,8 @@
// Copyright 2024-2025 Braden Ganetsky
// Copyright 2024-2026 Braden Ganetsky
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// Generated on 2025-08-21T03:09:19
// Generated on 2026-01-24T00:34:53
#ifndef BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
#define BOOST_UNORDERED_DETAIL_UNORDERED_PRINTERS_HPP
@@ -29,8 +29,14 @@ __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n"
".ascii \" return n\\n\"\n"
".ascii \" def maybe_unwrap_foa_element(e):\\n\"\n"
".ascii \" if f\\\"{e.type.strip_typedefs()}\\\".startswith(\\\"boost::unordered::detail::foa::element_type<\\\"):\\n\"\n"
".ascii \" return e[\\\"p\\\"]\\n\"\n"
".ascii \" # Sometimes the complex typedefs can't be resolved through a pointer\\n\"\n"
".ascii \" if e.type.strip_typedefs().code == gdb.TYPE_CODE_PTR:\\n\"\n"
".ascii \" foa_element = e.dereference()\\n\"\n"
".ascii \" else:\\n\"\n"
".ascii \" foa_element = e\\n\"\n"
".ascii \" if f\\\"{foa_element.type.strip_typedefs()}\\\".startswith(\\\"boost::unordered::detail::foa::element_type<\\\"):\\n\"\n"
".ascii \" return foa_element[\\\"p\\\"]\\n\"\n"
".ascii \" else:\\n\"\n"
".ascii \" return e\\n\"\n"
+1 -4
View File
@@ -12,10 +12,7 @@ import config : requires ;
path-constant TOP : . ;
# Adding -Wundef is blocked on (at least)
# https://github.com/boostorg/type_traits/issues/165
local gcc-flags = -Wsign-promo -Wconversion -Wsign-conversion -Wfloat-equal -Wshadow -Wno-variadic-macros ;
local gcc-flags = -Wsign-promo -Wconversion -Wsign-conversion -Wfloat-equal -Wshadow -Wundef -Wno-variadic-macros ;
local clang-flags = $(gcc-flags) -Wno-c99-extensions ;
local msvc-flags = /wd4494 ;
+14 -6
View File
@@ -1,5 +1,5 @@
// Copyright (C) 2023 Christian Mazakas
// Copyright (C) 2023-2024 Joaquin M Lopez Munoz
// Copyright (C) 2023-2026 Joaquin M Lopez Munoz
// 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)
@@ -148,12 +148,18 @@ namespace {
values2.push_back(raii_convertible(v));
}
thread_runner(values2, [&x](boost::span<raii_convertible> s) {
BOOST_TEST_EQ(x.insert(s.begin(), s.end()), s.size());
auto sz = x.size();
std::atomic<std::uint64_t> num_inserts{0};
std::atomic<std::uint64_t> num_attempted_inserts{0};
thread_runner(values2, [&x, &num_inserts, &num_attempted_inserts](boost::span<raii_convertible> s) {
num_inserts += x.insert(s.begin(), s.begin() + s.size() / 2);
num_inserts += x.insert(s.begin(), s.end());
num_attempted_inserts += s.size() + s.size() / 2;
});
BOOST_TEST_EQ(x.size(), sz + num_inserts);
BOOST_TEST_EQ(
raii::default_constructor, value_type_cardinality * values2.size());
raii::default_constructor, value_type_cardinality * num_attempted_inserts);
#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 50300) && \
BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50500)
// some versions of old gcc have trouble eliding copies here
@@ -1010,9 +1016,11 @@ namespace {
{
X x;
thread_runner(dummy, [&x, &init_list](boost::span<raii>) {
BOOST_TEST_EQ(x.insert(init_list), init_list.size());
std::atomic<std::uint64_t> num_inserts{0};
thread_runner(dummy, [&x, &init_list, &num_inserts](boost::span<raii>) {
num_inserts += x.insert(init_list);
});
BOOST_TEST_EQ(num_inserts, x.size());
BOOST_TEST_EQ(x.size(), reference_cont.size());
-5
View File
@@ -18,14 +18,9 @@ assert
config
container_hash
core
move
mp11
predef
preprocessor
static_assert
throw_exception
tuple
type_traits
# Secondary dependencies
+1 -1
View File
@@ -1205,7 +1205,7 @@ template <class UnorderedMap> void test_map_non_transparent_erase(UnorderedMap*)
BOOST_TEST_EQ(key::count_, key_count);
}
#if BOOST_UNORDERED_FOA_TESTS
#ifdef BOOST_UNORDERED_FOA_TESTS
typedef boost::unordered_flat_set<int, transparent_hasher,
transparent_key_equal>
transparent_unordered_set;