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
3f76f9fdf7
Fixes #206 ("operator-> on static_vector::iterator causes cast alignment warning")
2021-12-28 15:17:15 +01:00
Ion Gaztañaga
1cc35bbc98
Fixes #187 ("flat_map::erase and unique keys")
2021-08-08 00:38:29 +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
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
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
f50195524f
As described in #139 , fixed complexity of "merge", as a O(n) inplace merge is used and explicitly state all iterators are invalidated.
2020-11-14 23:31:30 +01:00
Ion Gaztañaga
93bbf37dad
Fixes #139 ("flat_map merge and iterators").
2020-11-14 00:10:46 +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
06417de498
Fixes #125 ("flat_map doc misleading complexity").
2020-07-13 12:31:58 +02:00
Ion Gaztañaga
1cf19898c0
Fixes #132 : flat_map::lower_bound and upper_bound have wrong/misleading docs
2019-10-19 22:55:46 +02:00
Ion Gaztañaga
d9341ec394
Fix "count" with heterogeneous lookups in flat_map and flat_set
2019-06-22 11:41:05 +02:00
Ion Gaztañaga
0c95d4846f
Fix "count" with heterogeneous lookups in flat_map and flat_set
2019-06-22 10:26:36 +02:00
Jan Eisenhauer
3319fdb0c2
Merge remote-tracking branch 'origin/develop' into patch-1
2019-06-11 11:05:29 +02:00
Jan Eisenhauer
699b1e966d
With heterogeneous lookup, equal_range can result in a range with length greater than 1.
2019-06-07 11:55:15 +02:00
Mitsuru Kariya
f25c767a2b
Fix has_trivial_destructor_after_move
...
Most template type parameters 'Allocator' were modified their default type to void since 1.70.0.
These modifications cause has_trivial_destructor_after_move to compile error or yield wrong result.
So, fix them by changing specializations of has_trivial_destructor_after_move.
2019-06-01 22:36:54 +09:00
Ion Gaztañaga
e46210e046
Fixes #117 ("flat_map/map::insert_or_assign with hint has wrong return types")
2019-04-23 17:03:09 +02:00
Ion Gaztañaga
81d78dbefa
Fixed GitHub #98 : ("flat_map: insert_or_assign does not work with hint")
2019-02-02 00:25:09 +01:00
Ion Gaztañaga
83bb62fed3
Default allocator parameter changed form new_alloator<T> to void to reduce symbol lenghts
2019-01-10 22:54:58 +01:00
Ion Gaztañaga
51669a5330
Complete pull #94 with flat_set/map/set containers
2018-11-29 23:37:10 +01:00
Tobias Loew
7f3d3ef8f9
merge CTADs with equivalent parameter-declaration-clauses
2018-11-21 15:09:33 +01:00
Ion Gaztañaga
cb21746b80
Rewrite CTAD and SFINAE-out overloads as the standard requires
2018-11-12 22:52:45 +01:00
Tobias Loew
bf660ad569
Fixed flat_map CTAD
2018-11-08 18:15:05 +01:00
Ion Gaztañaga
139db663a3
* Implemented C++20 contains() for associative containers as specified in P0458R2.
...
* Fixed serious bug in heterogeneous lookup functions (is_transparent was broken).
2018-08-13 15:36:00 +02:00
Ion Gaztañaga
9a22431578
* Clean up constructor template auto deduction guides to use Boost.Container traits
...
* GitHub #73 : '"triviality of pair".
* Fixed race condition bug in unsynchronized_pool_resource
2018-06-14 13:17:55 +02:00
Ion Gaztañaga
88f4a245ca
Merge branch 'ctad_testing' of https://github.com/rmpowell77/container into rmpowell77-ctad_testing
2018-05-14 11:52:41 +02:00
Richard Powell
72195ae288
Adding Constructor Template Auto Deduction guides.
2018-05-11 11:35:25 -06:00
Ion Gaztañaga
48c21e3187
Implemented C++14's heterogeneous lookups.
2018-05-01 14:55:24 +02:00
Ion Gaztañaga
6ce2b2d0f8
Add improved range insertion to flat associative containers and improve merge operation for vector.
2017-12-26 22:04:15 +01:00
Ion Gaztañaga
fa2494631a
Use namespace dtl instead of container_detail to avoid excessively long symbol names.
2017-11-07 00:51:46 +01:00
Ion Gaztañaga
9ee836ee3d
Fixes to flat_map when used as an adaptor from regression tests errors in Mingw.
2017-08-28 11:58:43 +02:00
Ion Gaztañaga
c123accab1
Complete support for user-provided containers to flat_[multi]map/set containers, and instantiate them with several container types.
2017-08-28 10:45:29 +02:00
Ion Gaztañaga
2297f6af72
Modify flat associative containers to be adaptors if the allocator argument is a container. This allows using stable_vector, small_vector, static_vector as underlying containers.
2017-08-27 12:40:15 +02:00
Ion Gaztañaga
863b6e0d32
- Remove wrong explicit default constructor for flat_[multi]set.
...
- Add missing forceinline to flat_map
2017-08-17 23:58:58 +02:00
Ion Gaztañaga
ec91367383
Review all associative containers and implement a different constructor overload to avoid any unnecessary copy construction of the predicate or the allocator.
2017-05-16 16:29:49 +02:00
Ion Gaztañaga
6580c94573
Documentation fixes
2017-04-08 00:23:41 +02:00
Ion Gaztañaga
3516da36b0
Doxygen documentation fixes
2017-04-08 00:17:23 +02:00
Ion Gaztañaga
d6749960fc
Implement extract_sequence and adopt_sequence for flat ordered associative containers
2017-04-05 16:06:31 +02:00
Ion Gaztañaga
f540b83ccd
* Implemented merge operations for associative containers.
...
* Update tree-based containers to changes done in Intrusive internal utilities in order to fix Trac 12432.
2016-09-03 00:03:42 +02:00
Ion Gaztañaga
4298d1984b
* Add missing extract() and insert(node_type) funtion to associative containers.
...
* Simplify select1st
2016-08-29 00:06:57 +02:00
Ion Gaztañaga
1467c51a4e
Implemented missing try_emplace member for maps.
2016-08-26 01:47:32 +02:00
Ion Gaztañaga
2d6f781a2f
Implemented "insert_or_assign" for map-like containers.
2016-08-18 20:29:04 +02:00
Ion Gaztañaga
fb1be6fa75
Fix Trac #12117 ("flat_set constructor with ordered_unique_range") adding checks to constructors in debug mode
...
Fix typos on value_type checks in flat_[multi]map.
2016-08-15 23:22:57 +02:00
Ion Gaztañaga
225e2da77e
Revised noexcept expressions of default and move constructors in all containers.
2016-08-01 23:49:51 +02:00
Ion Gaztañaga
e50a8f7cdf
Merge branch 'patch-1' of https://github.com/praetorian20/container into praetorian20-patch-1
2015-10-24 21:39:06 +02:00
Ion Gaztañaga
7764e05444
Changes to support GCC 3.4
2015-10-12 18:51:08 +02:00
Ashish Sadanandan
25f34506fd
Doc fixes for flap_map complexity requirements
...
Removed typo from one complexity spec and added periods after few others for consistency
2015-08-14 16:27:19 -06:00
Ion Gaztañaga
d39b1c143c
Add missing initializer list overload taking an additional allocator.
2015-02-28 23:46:08 +01:00
Ion Gaztañaga
6c5e527c60
Improve allocator propagation test with new constructors and refactor code to avoid too many wrappers.
2015-02-26 00:32:32 +01:00
Ion Gaztañaga
22f1d32f7b
Addd new constructors to containers, according to C++14's new constructors taking allocator arguments.
2015-02-03 14:08:29 +01:00