Commit Graph
21 Commits
Author SHA1 Message Date
Ion Gaztañaga bd8c8b0327 Add unused_storage optimization function 2024-09-09 00:37:47 +02:00
Ion Gaztañaga 8d0dc6daeb Fixes #285 ("devector<>::push_front asserts after clear()") 2024-07-15 10:41:42 +02:00
Ion Gaztañaga 0977e6b1d4 Use BOOST_STATIC_CONSTEXPR where applicable 2024-06-06 00:08:00 +02:00
Ion Gaztañaga 397fbda8be Fixes #280 ("Several containers don't support non-movable types when move assigning") 2024-05-23 23:28:54 +02:00
Ion Gaztañaga 292bab35c6 Revert accidental commit 2024-05-21 14:11:30 +02:00
Ion Gaztañaga 59d760c08b Document block_size option in deque_options. 2024-05-21 14:08:36 +02:00
Ion Gaztañaga 978bbb113a Clean force_ptr usage and use launder_cast 2024-04-15 12:51:15 +02:00
Ion Gaztañaga 1a4a205ea6 Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat 2023-05-10 22:09:01 +02:00
Ion Gaztañaga 552688c7fc Simplify dependencies dropping Boost.Core 2023-02-01 23:00:23 +01:00
Ion Gaztañaga 2b8e3cfafe aligned_storage is no longer used in the implementation, so remove the header include. 2022-12-12 00:59:59 +01:00
Ion Gaztañaga 4bed49ee14 Reworked devector's relocation options, instead of relocation_limit<relocation_limit_XX>, it's specified by single "relocate_on_XX" 2022-10-01 23:39:28 +02:00
Ion Gaztañaga 704bf10058 Refactor advanced insertion algorithms and implement a new devector insert strategy, moving elements to the middle if there is a reasonable free capacity at the other end of the container. 2022-09-20 00:22:19 +02:00
Ion Gaztañaga 0e675a241a Fix maybe uninitilized read warnings.
Fix initial allocation functions
2021-12-29 17:29:48 +01:00
Ion Gaztañaga 3f76f9fdf7 Fixes #206 ("operator-> on static_vector::iterator causes cast alignment warning") 2021-12-28 15:17:15 +01:00
Ion Gaztañaga dad2cb2d02 Support GCC's -Wconversion -Wfloat-conversion -Warith-conversion -Wsign-conversion warnings. 2021-10-16 15:57:47 +02:00
Ion Gaztañaga 16cada57ea Fixes #184 ("Issues with custom exceptions implementation") 2021-04-19 21:52:55 +02:00
Ion Gaztañaga c476113411 Merge branch 'noexcept-swap' of https://github.com/palebedev/container into palebedev-noexcept-swap 2021-01-02 00:38:31 +01:00
Ion Gaztañaga 621cd3a0ab Avoid using inheriting constructors and initializer_list::cbegin/cend to be nicer with older compilers 2021-01-01 23:44:56 +01:00
Pavel A. Lebedev cb1e6af53d Add conditional noexcept forwarding from free to member swap functions.
This allows std::is_nothrow_swappable{,_with} to work properly.
This only touches user-facing classes, with the following exceptions:
- map,set: only doc changes (with a drive-by missing semicolon fix),
  detail::tree which they derive from already forwards noexcept for swap.
- flat_set: only doc changes for flat_set and a change for
  detail::flat_tree, which it derives from to get swap.
- static_vector: while this adds the forwarding, member static_vector::swap
  is currently never noexcept, although it could be for noexcept-swappable
  and noexcept-move-constructible elements.
- small_vector: there is no free swap, and member swap is never noexcept,
  although it could be for noexcept-swappable and noexcept-move-
  constructible elements. Swapping small_vectors of exact same type goes
  through std::swap, which seems to get noexcept right, and small_vectors
  of different sizes use swap for boost::container::vector, which fails
  to detect when such swap could be noexcept. This patch doesn't touch
  small_vector.
- scoped_allocator: neither member nor free swap are noexcept, although
  they should be, and all other constructions/assignments/comparisons too,
  as they only forward these operations to underlying allocators, which
  are required to not throw exceptions for them. Only static_vector's
  static_storage_allocator might throw for these and it shouldn't appear
  in scoped_allocator. Unsure of the scope of changes needed or whether it
  is even worth it, this patch doesn't touch scoped_allocator.
2020-12-30 08:28:06 +03:00
Ion Gaztañaga 0a0ad0009e Add support for [[nodiscard]]:
- Decorate container and allocator functions.
- Make sure to disable warnings in tests
- Update doxygen documentation to support it
2020-11-05 14:24:35 +01:00
Ion Gaztañaga ebcd0222b4 Integrate and adapt "devector's", from Thaler Benedek's implementation. 2020-08-10 00:16:58 +02:00