Commit Graph

785 Commits

Author SHA1 Message Date
Ion Gaztañaga fbfa25d434 Add missing <.../multiallocation_chain.hpp> include 2026-01-18 21:38:06 +01:00
Ion Gaztañaga a0dd5bb7c5 Fix -Wshadow warning 2026-01-18 17:15:29 +01:00
Ion Gaztañaga 120d663949 Make node pool based allocators support overaligned types. To avoid breaking ABI, pack overalignment value in spare bits on existing fields. Probably in the future we want to break ABI to simplify the maintenance. 2026-01-18 16:15:01 +01:00
Ion Gaztañaga f818ee9bfd Delete alignment check, ubsan will be used to detect this in tests 2026-01-14 12:36:54 +01:00
Ion Gaztañaga 72ff09d7d2 Fix bug, m_nodes_per_block was directly used instead of unpacking its value and stripping the stored bits. 2026-01-13 01:26:43 +01:00
Ion Gaztañaga 7cc06da5d8 Insert alignment assertion for construct 2026-01-13 01:25:57 +01:00
Ion Gaztañaga ac36c424fd Add overalignment support for private_node_pool_impl. To avoid breaking ABI (internal Interprocess pool representation depends on this and it might brake programs) the overalignmend (alignment bigger than pointer alignment) is stored in the free bits of existing 3 integers. 2026-01-12 23:06:07 +01:00
Ion Gaztañaga b0d7141c0c Add compile time log2_pow2 2026-01-12 23:04:42 +01:00
Ion Gaztañaga 0e70115cd2 Add static const npos definition 2026-01-02 20:14:50 +01:00
Ion Gaztañaga 639337e079 Add missing string_view-like overloads for assign, insert and append. 2026-01-02 18:46:33 +01:00
Ion Gaztañaga 2659a1670a Since warnings in integer conversion on "operator<<" and "operator>>" 2026-01-02 18:45:02 +01:00
Ion Gaztañaga e14d24fd65 Fix missing default arguments for append and compare that were added in C++14 2026-01-02 18:43:43 +01:00
Ion Gaztañaga 414e89c781 Fix bug in operator[]: Access is allowed to the terminating null since C++11 2026-01-02 18:40:00 +01:00
Ion Gaztañaga 0a0ea3e694 Remove buffer_move_or_copy usage and reformat devector. 2026-01-02 18:30:02 +01:00
Ion Gaztañaga 84d9a29107 Implement the same logic as deque, resetting the back index to the first index instead of putting both at offset zero. 2026-01-02 13:39:16 +01:00
Ion Gaztañaga fe373c480b More consistent formatting and calls 2026-01-02 13:38:15 +01:00
Ion Gaztañaga d24a219afe Fix some documentation bugs generated by doxygen leaking macros 2025-12-28 01:55:20 +01:00
Ion Gaztañaga c99257c1dc Fix recursion in aligned_allocation. Rename aligned_alloc.hpp to aligned_allocation.hpp to be consistent:
- "aligned_allocation" will be the internal name for the utility in the Container library.
- "aligned_alloc" is the C11 function name
2025-12-26 16:14:33 +01:00
Ion Gaztañaga e19e121cf4 Make an exception to MacOs platforms, where system malloc only aligns to 8 bytes, even in ARM64. 2025-12-26 14:17:45 +01:00
Ion Gaztañaga ae9265dc7d Add overalignment support for new_delete_resource for newer (__cpp_aligned_new) and older standards, including some workaround for targets where __STDCPP_DEFAULT_NEW_ALIGNMENT__ value is not correctly aligned between GCC and the malloc implementation (Win32) 2025-12-26 10:59:37 +01:00
Ion Gaztañaga 1cef6075b8 Add BOOST_CONTAINER_NODISCARD to getters 2025-12-23 19:25:02 +01:00
Ion Gaztañaga e4fcf4b862 Add overaligned type support for global pmr: implement operator_new_raw_allocate/operator_delete_raw_deallocate and use them in new_delete_resource_imp 2025-12-23 11:02:38 +01:00
Ion Gaztañaga 7a22ae2ade Replace BOOST_CONTAINER_ATTRIBUTE_NODISCARD with BOOST_CONTAINER_NODISCARD 2025-12-18 15:56:59 +01:00
Ion Gaztañaga ac523b2c1e Add more BOOST_CONTAINER_ATTRIBUTE_NODISCARD attributes and fix warnings triggered by this attribute 2025-12-18 15:23:56 +01:00
Ion Gaztañaga 8ce8b9ee43 Add nodiscard to memory resource 2025-12-18 11:25:32 +01:00
Ion Gaztañaga 1a0bbe0e79 Add __declspec(novtable) for memory_resource in MSVC compilers to slightly optimize code generation (just like MS STL does) 2025-12-18 10:02:13 +01:00
Ion Gaztañaga 03d4f4fef7 Place better BOOST_CONTAINER_DOXYGEN_INVOKED checks so that doxygen does not generate unwanted types in the documentation 2025-12-17 23:39:27 +01:00
Ion Gaztañaga 68b80e6ac7 Implemented C++20's uninitialized_construct_using_allocator and make_obj_using_allocator. 2025-12-17 22:00:52 +01:00
Ion Gaztañaga f26b0ff58c Implement C++20's uninitialized_construct_using_allocator 2025-12-17 14:39:45 +01:00
Ion Gaztañaga cf54b3a333 Add #pragma once to devector.hpp 2025-12-17 14:38:42 +01:00
Ion Gaztañaga 2fe7163fa0 Hide uses_allocator_imp implementation detail from docs 2025-12-16 19:34:52 +01:00
Ion Gaztañaga 1ccebc915c Make sure pthread is used for cygwin 2025-12-16 19:34:36 +01:00
Ion Gaztañaga 145bd51451 Fix instantiation error in MSVC for recursive types when evaluating the conditional defaulted destructor. 2025-12-09 22:38:10 +01:00
Ion Gaztañaga ccc9efcd74 Make static_vector<T, N>'s destructor trivial if T is trivial. 2025-12-09 17:11:57 +01:00
Ion Gaztañaga 7a2192b417 Fixes #323 ("flat_tree::try_emplace UB") 2025-12-06 11:03:24 +01:00
Ion Gaztañaga ee24095f5c - Remove fallback_to_dispatch_uses_allocator
- Remove unused arg_alloc arguments
2025-11-30 23:23:35 +01:00
Ion Gaztañaga bad90ed378 Fix copy-paste error: use boost/container/xxx instead of wrong boost/interprocess/xxx 2025-11-30 16:52:49 +01:00
Ion Gaztañaga 9ae8e433e4 Implement "fallback_to_dispatch_uses_allocator". This helper function tests if the target type is constructible from the original arguments. If so, uses the original arguments. If not, fallbacks to uses-allocator construction via dispatch_uses_allocator. 2025-11-30 00:47:13 +01:00
Ion Gaztañaga 8bce1f9ecd Remove constructible_with_allocator_suffix/constructible_with_allocator_prefix from documentation as they are not needed now. Utilities will reman anonymous to maintain a minimum backwards compatibility. 2025-11-29 22:41:19 +01:00
Ion Gaztañaga e2d3cf7bd2 Use safe fallback with uses-allocator construction when prefix or suffix calls are not available. Instead of being ill-formed, ignore allocator argument, just like when uses_allocator<T>::value is false. 2025-11-29 21:54:21 +01:00
Ion Gaztañaga fdf6b37b67 - Use newly added is_constructible to implement portably constructible_with_allocator_suffix/constructible_with_allocator_prefix 2025-11-29 21:51:31 +01:00
Ion Gaztañaga 5039410be5 Add is_constructible implementation, compatible with several C++03 compilers 2025-11-29 21:48:11 +01:00
Ion Gaztañaga 86a69d852e Use newly added limit_by_stored_size_type 2025-11-29 21:46:39 +01:00
Ion Gaztañaga a682f10fbb Implement helper functions to deal with potential narrowing and avoid warnings 2025-11-29 21:46:06 +01:00
Ion Gaztañaga 68914708b2 Add dummy allocator utility to be able to use allocator_traits machinery without instantiating a real allocator 2025-11-24 21:25:04 +01:00
Ion Gaztañaga aca13505b8 Fix typo 2025-11-24 21:24:27 +01:00
Ion Gaztañaga 558e3f24e8 Fix typo 2025-11-23 00:43:27 +01:00
Ion Gaztañaga 5353cfc736 Implement C++26 heterogeneous "insert" for set and flat_set. Range insertion functions in flat_tree are renamed to support some older compilers that have problems with SFINAE against the heterogeneous insert overload 2025-11-09 21:16:24 +01:00
Ion Gaztañaga e4f42d03cb Implement heterogeneous "at()" operation for map/flat_map 2025-11-07 23:09:05 +01:00
Ion Gaztañaga 9f08eccc05 Implement C++26 heterogeneous operator[], refactor operator[] implementation. 2025-11-07 22:24:37 +01:00