271 Commits

Author SHA1 Message Date
Martin Leitner-Ankerl
3234af2c03 refactor: improve linter execution with concurrent processing, better output v4.8.1 2025-11-02 21:44:40 +01:00
Martin Leitner-Ankerl
ee90412393 bump version to 4.8.1 2025-11-02 21:44:40 +01:00
Martin Leitner-Ankerl
61fb2a2036 a few fixes due to update of clang-tidy to 21.1.4 2025-11-02 21:44:40 +01:00
Martin Leitner-Ankerl
333befcb07 add lint script to check for stdint types without std:: prefix 2025-11-02 21:44:40 +01:00
Arthur LAURENT
8d47c60b96 fix overlooked uint8_t missing std:: and fix missing cstdint header include in module 2025-11-02 19:52:45 +01:00
Martin Leitner-Ankerl
e6dbba2b67 refactor: clean up linter scripts v4.8.0 2025-10-27 17:32:06 +01:00
Martin Leitner-Ankerl
3b454f0ebe bump version to 4.8.0, update stl.h in linter script 2025-10-27 17:32:06 +01:00
Martin Leitner-Ankerl
820babe2fc format with clang-format 2025-10-27 17:32:06 +01:00
Arthur LAURENT
40a6724ce7 fix example compilation when using modules 2025-10-27 07:36:41 +01:00
Arthur LAURENT
349b8c1785 add CI for C++ module on windows-x64/cl and linu-x64x/clang 2025-10-27 07:36:41 +01:00
Arthur LAURENT
8ab51b8511 fix stl getting not included on msvc when C++23 is enabled 2025-10-27 07:36:41 +01:00
Arthur LAURENT
942bb1d2b6 add support for compiling the example and the module for cmake buildsystem 2025-10-27 07:36:41 +01:00
Arthur LAURENT
82bdd82b77 enable C++23 on all CI 2025-10-27 07:36:41 +01:00
Arthur LAURENT
48b9d39203 support C++23 import std on unordered_dense module 2025-10-27 07:36:41 +01:00
Martin Leitner-Ankerl
554c5098b4 Add GitHub Copilot instructions for ankerl::unordered_dense
Fully generated with Claude Sonnet 4.5
v4.7.0
2025-10-11 21:49:59 +02:00
Martin Leitner-Ankerl
efd15c4266 Bump version to 4.7.0 with the new replace_key method 2025-10-11 21:49:59 +02:00
Martin Leitner-Ankerl
73bd97842f Fix typos and improve clarity in README.md 2025-10-11 21:49:59 +02:00
Martin Leitner-Ankerl
cd32d8e467 Add key replacement and erase-and-shift-down methods to unordered_dense
No tests yet
2025-10-11 21:49:59 +02:00
Martin Leitner-Ankerl
f8059d8273 Bump version to 4.6.0 in CMakeLists.txt, header file, and Meson build configuration v4.6.0 2025-10-08 12:42:20 +02:00
Martin Leitner-Ankerl
70a0d5ff1d Refactor CI workflow to enhance MinGW and Windows job configurations, add compiler version printing, and improve artifact handling for test logs. 2025-10-08 10:16:50 +02:00
Martin Leitner-Ankerl
792f3450ea Enhance Linux sanitizer job to support multiple compilers and update version printing 2025-10-08 10:16:50 +02:00
Martin Leitner-Ankerl
43d1f4f4a5 Add steps to print compiler versions in CI workflow 2025-10-08 10:16:50 +02:00
Martin Leitner-Ankerl
cf89359577 Add unit test for segmented_map in array_of_maps.cpp 2025-10-08 10:16:50 +02:00
Martin Leitner-Ankerl
82c4830527 Fix README.md regarding stability of segmented_map and segmented_set references.
Fixes #141
2025-10-08 09:39:56 +02:00
Martin Leitner-Ankerl
43fa2f36be Refactor type aliasing to remove unnecessary typename qualifiers in unordered_dense.h 2025-10-07 19:55:58 +02:00
Martin Leitner-Ankerl
c00b36e237 Update CI workflow to also use clang-tidy linter 2025-10-07 19:55:58 +02:00
Martin Leitner-Ankerl
72ed69de56 Refactor clang-tidy configuration and add linting script for unordered_dense.h 2025-10-07 19:55:58 +02:00
Martin Leitner-Ankerl
69f59dfeca Add Linux sanitizer job to CI with address, thread, and undefined checks 2025-10-07 13:03:20 +02:00
Martin Leitner-Ankerl
0d0810ffd4 Enhance CI workflow by adding APT package caching for clang-format and updating linting scripts 2025-10-07 13:03:20 +02:00
Martin Leitner-Ankerl
9aa4e50d74 Add ARM64 support to Linux CI workflow with compiler matrix 2025-10-07 13:03:20 +02:00
Martin Leitner-Ankerl
2db8c12ba1 Add MinGW CI job with architecture matrix support, and windows 32bit builds 2025-10-07 13:03:20 +02:00
Martin Leitner-Ankerl
6fe418a7a1 Enhance Linux CI workflow with compiler and architecture matrix support 2025-10-07 13:03:20 +02:00
Jelle
651d9eb217 Add C++ version check for likely/unlikely attributes 2025-10-07 04:40:16 +02:00
Jelle
a3a17f01e8 Add support for c++20 likely/unlikely attributes 2025-10-07 04:40:16 +02:00
Pedro Alves
0314c5f3ca Fix MinGW build with _WIN32_WINNT<0x600, GCC>=13, model=win32
unordered_dense.h fails to compile on Windows/MinGW with GCC >= 13
with thread model win32, and _WIN32_WINNT < 0x600 (Vista), in
CFLAGS/CXXFLAGS.  E.g., GDB defines _WIN32_WINNT to 0x501, and it
fails to build with GCC 14.2 like so:

   CXX    ada-exp.o
 In file included from /opt/xpack-mingw-w64-gcc-14.2.0-1/x86_64-w64-mingw32/include/c++/14.2.0/shared_mutex:42,
		  from /opt/xpack-mingw-w64-gcc-14.2.0-1/x86_64-w64-mingw32/include/c++/14.2.0/memory_resource:66,
		  from /home/pedro/gdb/src/gdb/../gdbsupport/unordered_dense.h:104,
		  from /home/pedro/gdb/src/gdb/../gdbsupport/unordered_map.h:21,
		  from /home/pedro/gdb/src/gdb/gdbtypes.h:53,
		  from /home/pedro/gdb/src/gdb/expression.h:23,
		  from /home/pedro/gdb/src/gdb/ada-exp.y:40:
 /opt/xpack-mingw-w64-gcc-14.2.0-1/x86_64-w64-mingw32/include/c++/14.2.0/bits/std_mutex.h:164:5: error: '__gthread_cond_t' does not name a type; did you mean '__gthread_once_t'?
   164 |     __gthread_cond_t* native_handle() noexcept { return &_M_cond; }
       |     ^~~~~~~~~~~~~~~~
       |     __gthread_once_t
 (... snip other instances of same ...)

The problem is that unordered_dense.h includes <memory_resource>,
which uses std::mutex, and thus needs to include <mutex>.  (See
<https://quuxplusone.github.io/blog/2018/06/05/libcpp-memory-resource>,
"Notice that synchronized_pool_resource contains a mutex, which means
that <memory_resource> effectively must include <mutex>.")

GCC 13 rewrote the win32 thread model support, and in that rewrite,
support for __gthread_cond_t in std_mutex.h became conditional on
_WIN32_WINNT >= 0x600.

GCC/libstdc++ also has <experimental/memory_resource> so with this
patch, such a configuration takes that branch and succeeds, because
<experimental/memory_resource> does not include <mutex>.

Tested with MinGW-w64 GCC 14.2, posix and win32 models.
Tested with MinGW-w64 GCC 10.1, posix and win32 models.
Tested with GNU/Linux GCC 11.4.0.
2025-10-06 14:04:10 +02:00
viable-alternative
70c4c79719 Fixed compiler error C2061 in VS2022 syntax error: identifier 'T'" 2025-10-06 09:55:54 +02:00
Jean-Michaël Celerier
b4802df020 Disable ubsan's integer sanitizer warnings
They crop up on valid per the standard (but sometimes bogus) uses
of modular arithmetic on unsigned integers, such as in hash functions.
2025-10-06 08:06:24 +02:00
Martin Leitner-Ankerl
f9bd51faca Add tests for segmented_vector resize functionality
This test uses a full obj that does counting and is not trivially destructible
2025-10-06 08:01:53 +02:00
Liss Heidrich
5dbcfc7650 implement resize functions 2025-10-05 16:52:42 +02:00
Dmitry Sokolov
cac780fe97 minor segmented_vector fixes
- fix move constructor (use of uninitialized allocator)
- fix constness in iter_t operators +(diff), -(iter)
- make iter_t random access
2025-10-05 16:18:06 +02:00
Martin Leitner-Ankerl
3553239f15 cache apt 2025-10-05 15:50:02 +02:00
Martin Leitner-Ankerl
958e572fd4 main.yml: better caching, use latest ccache-action, better permissions 2025-10-05 15:50:02 +02:00
Martin Leitner-Ankerl
d81bcd37e9 Update github's workflow to latest versions 2025-10-05 15:50:02 +02:00
Martin Leitner-Ankerl
39f9a06655 Fix compile issues with recent compilers
* Update wrap files
* Ignore clang's warning in doctest:

<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" [-Werror,-W#warnings]

Make sure app/doctest.h is used everywhere instead of directly including the header, so the warning is disabled everywhere
2025-10-05 15:50:02 +02:00
Martin Leitner-Ankerl
73f3cbb237 Adds ANKERL_UNORDERED_DENSE_DISABLE_PMR, fixes #109 v4.5.0 2024-12-03 19:36:02 +01:00
Martin Leitner-Ankerl
2573644caa Bump version to 4.5.0 2024-12-03 19:36:02 +01:00
Martin Leitner-Ankerl
962f4f7bff add c++23 build 2024-12-03 19:36:02 +01:00
Martin Leitner-Ankerl
67e8d7bd43 clang-format version 19.1.4 updates 2024-12-03 19:36:02 +01:00
TriceHelix
00a0c1acfb Add iter_t::operator++(int) overload 2024-12-03 18:26:28 +01:00
Martin Leitner-Ankerl
f30ed41b58 clang-formatted 2024-10-05 15:17:07 +02:00