From 009bd32c3de1dfcaff23d4e939a7821e7d10ebfd Mon Sep 17 00:00:00 2001 From: Braden Ganetsky Date: Wed, 31 Dec 2025 17:46:15 -0600 Subject: [PATCH 01/13] Mark natvis file as PUBLIC in CMakeLists.txt, mirroring the CMake in Boost.Assert --- CMakeLists.txt | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bcd6769a0..915c1f3221 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() From c70208609edf59e93aef2c39434b4745e8e31c0a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 1 Jan 2026 15:20:55 +0200 Subject: [PATCH 02/13] Add clang-19, clang-20, macos-26 to ci.yml. Replace macos-13 with macos-latest. --- .github/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c0aa05e0f..17be1b6118 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,6 +101,10 @@ jobs: - { compiler: 'clang-17', cxxstd: '17,20,2b', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-17 libc++-17-dev libc++abi-17-dev' } - { compiler: 'clang-18', cxxstd: '11,14', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-18 libc++-18-dev libc++abi-18-dev' } - { compiler: 'clang-18', cxxstd: '17,20,2b', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-18 libc++-18-dev libc++abi-18-dev' } + - { compiler: 'clang-19', cxxstd: '11,14', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-19 libc++-19-dev libc++abi-19-dev' } + - { compiler: 'clang-19', cxxstd: '17,20,2b', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-19 libc++-19-dev libc++abi-19-dev' } + - { compiler: 'clang-20', cxxstd: '11,14,17', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-20 libc++-20-dev libc++abi-20-dev' } + - { compiler: 'clang-20', cxxstd: '20,23,2c', os: 'ubuntu-24.04', stdlib: libc++, install: 'clang-20 libc++-20-dev libc++abi-20-dev' } # not using libc++ because of https://github.com/llvm/llvm-project/issues/52771 - { name: "clang-18 w/ sanitizers (11,14)", sanitize: yes, @@ -117,10 +121,12 @@ jobs: stdlib: libc++, install: 'clang-18 libc++-18-dev libc++abi-18-dev', ccache_key: "tsan" } # OSX, clang - - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-13', sanitize: yes, ccache: no, ccache_key: "san1" } - - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-13', thread-sanitize: yes, targets: 'libs/unordered/test//cfoa_tests', ccache: no, ccache_key: "tsan" } + - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-latest', sanitize: yes, ccache: no, ccache_key: "san1" } + - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-latest', thread-sanitize: yes, targets: 'libs/unordered/test//cfoa_tests', ccache: no, ccache_key: "tsan" } + - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-14' } - - { compiler: clang, cxxstd: '11,14,17,20,2b', os: 'macos-15' } + - { compiler: clang, cxxstd: '11,14,17,20,23,2c', os: 'macos-15' } + - { compiler: clang, cxxstd: '11,14,17,20,23,2c', os: 'macos-26' } timeout-minutes: 360 # posix (gcc-12 w/ sanitizers is taking longer than 210 minutes From 665371e6daa58db97f638108eb506be097ff82ca Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 1 Jan 2026 18:19:10 +0200 Subject: [PATCH 03/13] Check __cpp_aligned_new in test/helpers/pmr.hpp before using std::align_val_t --- test/helpers/pmr.hpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/test/helpers/pmr.hpp b/test/helpers/pmr.hpp index cfa10dce8c..6b8fe6dfab 100644 --- a/test/helpers/pmr.hpp +++ b/test/helpers/pmr.hpp @@ -11,6 +11,7 @@ #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE #include +#include namespace test { class counted_new_delete_resource : public std::pmr::memory_resource @@ -25,17 +26,45 @@ namespace test { void* do_allocate(std::size_t bytes, std::size_t alignment) override { _count += bytes; + +#if defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606L + return ::operator new(bytes, std::align_val_t(alignment)); + +#else + + return ::operator new(bytes); + (void)alignment; + +#endif } void do_deallocate( void* p, std::size_t bytes, std::size_t alignment) override { _count -= bytes; -#if __cpp_sized_deallocation + +#if defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606L +# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L + ::operator delete(p, bytes, std::align_val_t(alignment)); -#else + +# else + ::operator delete(p, std::align_val_t(alignment)); + +# endif +#else +# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L + + ::operator delete(p, bytes); + +# else + + ::operator delete(p); + (void)alignment; + +# endif #endif } From c5cd88e2a86297666bd324d4c539e23e2548dce6 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 1 Jan 2026 19:50:07 +0100 Subject: [PATCH 04/13] solved https://www.cve.org/CVERecord?id=CVE-2025-64718 (#335) --- doc/package-lock.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/package-lock.json b/doc/package-lock.json index 20d329ab47..164826fd12 100644 --- a/doc/package-lock.json +++ b/doc/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "name": "doc", "devDependencies": { "@antora/cli": ">=3.1.14", "@antora/site-generator": ">=3.1.14", @@ -1164,10 +1165,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" }, From af4777287692dfb7853d4a1426b046dd71fa986e Mon Sep 17 00:00:00 2001 From: joaquintides Date: Sat, 3 Jan 2026 16:50:37 +0100 Subject: [PATCH 05/13] simplified doc/Jamfile.v2 (#336) --- doc/Jamfile.v2 | 54 ++++++++++---------------------------------------- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 0feecab2ee..70ff935692 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -1,57 +1,23 @@ -import generate ; -import path ; -import property-set ; -import virtual-target ; +# 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) -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 : @delayed-glob ; -install install - : files-to-install - : html - 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 * ) -{ - 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 /antora - local root = [ path.root html [ $(project).location ] ] ; - local files ; +make cleanup_node_modules_ : html_ : @cleanup-node-modules ; - # 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) ; +actions cleanup-node-modules +{ + bash -c "rm -rf node_modules" } ############################################################################### alias boostdoc ; explicit boostdoc ; -alias boostrelease : install ; -explicit boostrelease ; +alias boostrelease : html_ ; +explicit boostrelease ; \ No newline at end of file From c09d52fe84e46215ede34946a51b36be465f3832 Mon Sep 17 00:00:00 2001 From: Sam Darwin Date: Sun, 4 Jan 2026 03:18:49 -0700 Subject: [PATCH 06/13] Docs: download extension (#332) --- doc/package-lock.json | 9 +++++++++ doc/package.json | 3 +++ doc/unordered-playbook.yml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/doc/package-lock.json b/doc/package-lock.json index 164826fd12..3884c8da06 100644 --- a/doc/package-lock.json +++ b/doc/package-lock.json @@ -5,6 +5,9 @@ "packages": { "": { "name": "doc", + "dependencies": { + "@cppalliance/antora-downloads-extension": "^0.0.2" + }, "devDependencies": { "@antora/cli": ">=3.1.14", "@antora/site-generator": ">=3.1.14", @@ -287,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", diff --git a/doc/package.json b/doc/package.json index fd6012abf0..a7c753eee5 100644 --- a/doc/package.json +++ b/doc/package.json @@ -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" } } diff --git a/doc/unordered-playbook.yml b/doc/unordered-playbook.yml index dcd2c3065f..e55391b8d6 100644 --- a/doc/unordered-playbook.yml +++ b/doc/unordered-playbook.yml @@ -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' From 86521cc4a42eb76f94c72ea1289d9945a74478a4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 4 Jan 2026 14:23:23 +0200 Subject: [PATCH 07/13] Enable -Wundef in test/Jamfile.v2 --- test/Jamfile.v2 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 38ee478c36..40d206f664 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -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 ; From 597276dd9af465ce77c8c654e3d004da3ea55377 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 4 Jan 2026 14:23:56 +0200 Subject: [PATCH 08/13] Fix -Wundef warning in transparent_tests.cpp --- test/unordered/transparent_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unordered/transparent_tests.cpp b/test/unordered/transparent_tests.cpp index 8b755c9238..2ed6ff6374 100644 --- a/test/unordered/transparent_tests.cpp +++ b/test/unordered/transparent_tests.cpp @@ -1205,7 +1205,7 @@ template 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 transparent_unordered_set; From d60d9069f030c7aeccdac9e7ec6fc4d2d9a779e8 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Mon, 5 Jan 2026 13:15:31 +0100 Subject: [PATCH 09/13] improved cleanup-node-modules (#337) --- doc/Jamfile.v2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 70ff935692..f551dd5ff3 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -2,6 +2,8 @@ # 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 ; + make html_ : build_antora.sh : @run-script ; actions run-script @@ -9,11 +11,14 @@ actions run-script bash $(>) } +path-constant DOC_DIR : . ; +.node_modules = [ path.join $(DOC_DIR) node_modules ] ; + make cleanup_node_modules_ : html_ : @cleanup-node-modules ; actions cleanup-node-modules { - bash -c "rm -rf node_modules" + rm -rf $(.node_modules) } ############################################################################### From 83395442ab91ae2ed1502aa4839e4f4009403946 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 8 Jan 2026 13:17:05 +0100 Subject: [PATCH 10/13] fixed some issues with doc building (#339) * added cleanup_node_modules_ to target boostrelease * removed antora_docs.sh --- doc/Jamfile.v2 | 2 +- doc/antora_docs.sh | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100755 doc/antora_docs.sh diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index f551dd5ff3..ab0dd67a97 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -24,5 +24,5 @@ actions cleanup-node-modules ############################################################################### alias boostdoc ; explicit boostdoc ; -alias boostrelease : html_ ; +alias boostrelease : html_ cleanup_node_modules_ ; explicit boostrelease ; \ No newline at end of file diff --git a/doc/antora_docs.sh b/doc/antora_docs.sh deleted file mode 100755 index 5fc4a42999..0000000000 --- a/doc/antora_docs.sh +++ /dev/null @@ -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 From ba00d17236f7535f399426ac67dbfb7781fb9b56 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 22 Jan 2026 19:38:52 +0300 Subject: [PATCH 11/13] Remove dependencies on Boost.StaticAssert. Boost.StaticAssert has been merged into Boost.Config, so remove the dependency. --- test/cmake_subdir_test/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cmake_subdir_test/CMakeLists.txt b/test/cmake_subdir_test/CMakeLists.txt index 745cd1097d..f30d86b723 100644 --- a/test/cmake_subdir_test/CMakeLists.txt +++ b/test/cmake_subdir_test/CMakeLists.txt @@ -22,7 +22,6 @@ move mp11 predef preprocessor -static_assert throw_exception tuple type_traits From 08aa7fe1c35b0d263d26369a7387c9a467d64501 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 23 Jan 2026 17:12:01 +0200 Subject: [PATCH 12/13] Update test/cmake_subdir_test --- test/cmake_subdir_test/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/cmake_subdir_test/CMakeLists.txt b/test/cmake_subdir_test/CMakeLists.txt index f30d86b723..f1f33481f9 100644 --- a/test/cmake_subdir_test/CMakeLists.txt +++ b/test/cmake_subdir_test/CMakeLists.txt @@ -18,13 +18,9 @@ assert config container_hash core -move mp11 predef -preprocessor throw_exception -tuple -type_traits # Secondary dependencies From df2dfe614041c0d88e7ed561c006088bec2451b4 Mon Sep 17 00:00:00 2001 From: Braden Ganetsky Date: Tue, 27 Jan 2026 13:47:24 -0600 Subject: [PATCH 13/13] Fix GDB pretty-printers to work with GCC and C++26 (#342) --- extra/boost_unordered_printers.py | 12 +++++++++--- .../boost/unordered/detail/unordered_printers.hpp | 14 ++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/extra/boost_unordered_printers.py b/extra/boost_unordered_printers.py index 07e0893ee4..07f371a686 100644 --- a/extra/boost_unordered_printers.py +++ b/extra/boost_unordered_printers.py @@ -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 @@ def maybe_unwrap_atomic(n): 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 diff --git a/include/boost/unordered/detail/unordered_printers.hpp b/include/boost/unordered/detail/unordered_printers.hpp index 0bb03847b0..419e21bbb7 100644 --- a/include/boost/unordered/detail/unordered_printers.hpp +++ b/include/boost/unordered/detail/unordered_printers.hpp @@ -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"