mirror of
https://github.com/boostorg/unordered.git
synced 2026-08-04 04:34:12 +02:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 08aa7fe1c3 | |||
| 33169aaf41 | |||
| ba00d17236 | |||
| 83395442ab | |||
| d60d9069f0 | |||
| 597276dd9a | |||
| 86521cc4a4 | |||
| c09d52fe84 | |||
| af47772876 | |||
| 719e77f113 | |||
| 8d68f6d22b | |||
| c5cd88e2a8 | |||
| 665371e6da | |||
| c70208609e | |||
| 009bd32c3d |
@@ -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
|
||||
|
||||
+21
-5
@@ -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
@@ -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 ;
|
||||
@@ -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
|
||||
Generated
+14
-3
@@ -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,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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
+1
-4
@@ -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 ;
|
||||
|
||||
|
||||
@@ -18,14 +18,9 @@ assert
|
||||
config
|
||||
container_hash
|
||||
core
|
||||
move
|
||||
mp11
|
||||
predef
|
||||
preprocessor
|
||||
static_assert
|
||||
throw_exception
|
||||
tuple
|
||||
type_traits
|
||||
|
||||
# Secondary dependencies
|
||||
|
||||
|
||||
+31
-2
@@ -11,6 +11,7 @@
|
||||
#ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
|
||||
|
||||
#include <memory_resource>
|
||||
#include <new>
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user