323 Commits

Author SHA1 Message Date
Ion Gaztañaga
34cd414280 Fixes #221 ("flat_set and friends should offer a const sequence_type& sequence() const method (...)") 2022-06-25 20:29:16 +02:00
Ion Gaztañaga
d3ec5c677d Fixes #222 ("Fix incomplete type error when using list with pair") 2022-06-25 19:40:05 +02:00
Ion Gaztañaga
8a4620da17 Add experimental fastmod_buckets support 2022-06-13 00:50:37 +02:00
Ion Gaztañaga
ccf13f6770 Use Boost.Intrusive's key_of_value option to simplify the implementation 2022-06-13 00:49:43 +02:00
Ion Gaztañaga
39ce5633f3 Simplify operator!= 2022-06-13 00:46:27 +02:00
Ion Gaztañaga
7e70b700e0 Add default constructor to key_node_pred() 2022-06-13 00:46:01 +02:00
Ion Gaztañaga
d6badf63b0 Update work-in-progress testing hash container to latest Intrusive improvements 2022-05-04 23:43:27 +02:00
Ion Gaztañaga
d004191b45 Add BOOST_CONTAINER_FORCEINLINE to trivial functions 2022-05-04 23:42:40 +02:00
Ion Gaztañaga
def7a52269 Add BOOST_CONTAINER_FORCEINLINE to trivial functions 2022-05-04 23:38:58 +02:00
Ion Gaztañaga
2b4480b9fd Fix compilation error due to using equal nat types. Use boost::move_detail::natN instead 2022-03-10 12:54:23 +01:00
Ion Gaztañaga
93741ee6f2 Add missing typenames for bucket_traits y bucket_type 2022-03-10 12:02:06 +01:00
Ion Gaztañaga
43a22fee95 Provide an initial bucket to the intrusive container for hash-based containers 2022-03-10 11:36:02 +01:00
Ion Gaztañaga
b113017930 Add minimal support for limited and experimental hash table 2022-03-10 10:30:24 +01:00
Ion Gaztañaga
f8595fc39f Rename Rename "real_key_of_value" to "tree_key_of_value" 2022-03-10 10:29:24 +01:00
Ion Gaztañaga
3787fc3021 Fixes #207 ("boost.vector doesn't work with common_iterator") 2022-01-12 01:38:05 +01:00
Ion Gaztañaga
88b4cf09d9 Forward declare Dinkumware Stdlib's "struct _Nil" in is_pair.hpp instead of pair.hpp 2022-01-04 16:29:59 +01:00
Ion Gaztañaga
15d61d6d26 Refactor node implemenations from 3 (slist_node, list_node and tree_node) to a single base_node:
- To avoid unneeded includes, is_pair is factored out from pair.hpp implementation
- Fixed bug where value_types inside nodes were not allocator-ware destructed.
- Changed scoped utilities to handle new clases
2022-01-04 00:41:34 +01:00
Ion Gaztañaga
576e15d6f6 Increase minimum version for forceinline usage in MSVC as bad code generation was detected in some cases 2022-01-04 00:24:27 +01:00
Ion Gaztañaga
b6020f5d73 Use BOOST_MOVE_TO_LV in pair to avoid potential UB 2022-01-02 00:26:44 +01:00
Ion Gaztañaga
a111e9f369 Use BOOST_CONTAINER_FORCEINLINE with GCC > 5 due to some code generation errors detected in MinGW 2022-01-02 00:07:42 +01:00
Ion Gaztañaga
ef0eba34f6 Fix potential null pointer in memmove warning for GCC 2021-12-30 12:51:53 +01:00
Ion Gaztañaga
4301005b25 Remove some Wmaybe-uninitialized warnings for GCC 11 2021-12-29 23:43:44 +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
ea3521bf14 Fix -Wshadow warnings 2021-12-27 14:40:29 +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
1cc35bbc98 Fixes #187 ("flat_map::erase and unique keys") 2021-08-08 00:38:29 +02:00
Ion Gaztañaga
aaa2485ebf Fixes #188 ("Build fails when RTTI is disabled") 2021-08-08 00:06:01 +02:00
Ion Gaztañaga
ad7167c564 Fixes #150 ("Use std::contiguous_iterator_tag if available"), tested in MSVC and GCC. 2021-04-21 00:43:31 +02:00
Ion Gaztañaga
16cada57ea Fixes #184 ("Issues with custom exceptions implementation") 2021-04-19 21:52:55 +02:00
Ion Gaztañaga
1dc1e74668 Remove std::pair dependency for multiallocation_chain 2021-01-15 20:43:27 +01:00
Ion Gaztañaga
d2587837eb Use <boost/detail/interlocked.hpp> for interlocked operations 2021-01-15 18:05:15 +01:00
Ion Gaztañaga
26bf1d68be Add missing header for std::pair usage 2021-01-15 18:04:58 +01:00
Ion Gaztañaga
cce50a153d Use #include <boost/intrusive/detail/value_functors.hpp> instead of own value_functor.hpp 2021-01-05 10:10:57 +01:00
Ion Gaztañaga
2bd1a6f906 Add find_end algorithm and use it in string. 2021-01-02 17:03:15 +01: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
d7e99e56c6 Rewrite [flat_]map/set insert overloads to be more standard compliant. Fixes #102 ("flat_map::insert ambiguous with initializer list & pairs that need to convert"). 2021-01-01 23:50:50 +01:00
Ion Gaztañaga
6c23ce8b42 Avoid including windows.h 2021-01-01 23:44:07 +01:00
Ion Gaztañaga
80697e7c0f #pragma GCC diagnostic push is available from GCC 4.6, not from GCC 4.5 2021-01-01 23:43:44 +01:00
Ion Gaztañaga
d5a830434e - Replaced default standard exception classes with Boost.Container own classes, reducing considerably the included files overhead 2020-12-30 15:07:32 +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
ae93df82ea Fixes #164 ("Compile error when using pmr::map with a std::pair; works when using a std::tuple") 2020-11-13 23:43:02 +01: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
d4c8bd70ea Fixes #152 ("Tree-based containers have troubles with move-only types") 2020-10-31 23:09:52 +01:00
Ion Gaztañaga
03f030af69 Fixes #156: ("Compile error with vector") and remove warnings about precission loss due to integer narrowing 2020-10-22 01:10:07 +02:00
Ion Gaztañaga
6ca40b9e86 Use custom placement new to support -fno-exceptions 2020-10-21 22:49:25 +02:00
Tobias Loew
a47234cc1c fixed container_rebind for small_vector with options
container_rebind did not compile for small_vector when options are used
2020-09-02 07:24:04 +02:00
Ion Gaztañaga
cdd6d9ad8a Fixes #160 ("Usage of uses_allocator needs a remove_cvref_t") 2020-08-31 22:21:41 +02:00
Ion Gaztañaga
438813726b Add BOOST_CONTAINER_FORCEINLINE to trivial operations. 2020-08-31 13:36:46 +02:00
Lucas Camolezi
2f9f3831ef Add missing include
Allow this header file to be built standalone, in a clang C++ modules context.
2020-08-25 15:15:59 -03:00
Ion Gaztañaga
5d100cb45f Add BOOST_CONTAINER_FORCEINLINE to trivial functions 2020-08-11 23:50:08 +02:00