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
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
1cf19898c0
Fixes #132 : flat_map::lower_bound and upper_bound have wrong/misleading docs
2019-10-19 22:55:46 +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
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
Ion Gaztañaga
cb21746b80
Rewrite CTAD and SFINAE-out overloads as the standard requires
2018-11-12 22:52:45 +01:00
Ion Gaztañaga
73ad892393
Make set::equal_range BOOST_CONTAINER_FORCEINLINE
2018-09-15 00:51:13 +02: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
2802a1f50d
- Add configuration options to vector
...
- Cleanup tree configuration options
2017-12-10 23:33:41 +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
Edward Catmur
63174be55d
Document set::extract and multiset::extract.
2017-07-11 12:28:07 +01: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
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
225e2da77e
Revised noexcept expressions of default and move constructors in all containers.
2016-08-01 23:49:51 +02:00
Ion Gaztañaga
8851580370
Documentation fixes
2015-09-07 19:06:45 +02: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
3949963645
Fix "void multiset::insert(std::initializer_list<value_type> il)" calling base_t::insert_unique instead of base_t::insert_equal
2015-02-27 19:19:23 +01:00
Ion Gaztañaga
c2ea5da716
Fix move constructors with unequal allocators and move/copy assignment of tree.
2015-02-26 00:22:23 +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
Ion Gaztañaga
a7adc46a54
More changes to include boost/config.hpp before testing BOOST_HAS_PRAGMA_ONCE
2015-02-02 16:00:58 +01:00
Ion Gaztañaga
b786c8f716
Replaced BOOST_CONTIANER_NOEXCEPT with BOOST_NOEXCEPT
2015-01-28 22:11:00 +01:00
Ion Gaztañaga
9fede24d7e
Replace BOOST_MOVE_IMPDEF with BOOST_CONTAINER_IMPDEF
2015-01-26 00:33:40 +01:00
Ion Gaztañaga
ef7137a945
Replace BOOST_MOVE_IMPDEF with BOOST_CONTAINER_IMPDEF
2015-01-26 00:30:01 +01:00
Ion Gaztañaga
cb732a22be
Replace BOOST_MOVE_IMPDEF with BOOST_CONTAINER_IMPDEF
2015-01-26 00:14:35 +01:00
Ion Gaztañaga
dbafd61d4d
updated move assignments and swap operations to "N4258: Cleaning-up noexcept in the Library, Rev 3" with some customizations.
2015-01-19 00:18:44 +01:00
Ion Gaztañaga
a322203a89
Replaced _MSC_VER with BOOST_HAS_PRAGMA_ONCE before #pragma once.
2015-01-10 12:50:17 +01:00
Ion Gaztañaga
360957a797
Massive dependency reduction. Removed dependency on several boost libraries and standard C++ headers.
2015-01-02 19:34:21 +01:00
Ion Gaztañaga
955248b739
Replace "Allocator" template parameter with "A", according to the standard.
2014-12-11 22:01:58 +01:00
Ion Gaztañaga
7971dc6602
Refactored uses of <iterator> and <algorithm> to avoid dependencies where possible.
2014-11-26 07:08:06 +01:00
Ion Gaztañaga
6f1f162cb3
- Added nth and index_of.
...
- Used BOOST_MOVE_BASE
2014-11-01 20:03:25 +01:00
Ion Gaztañaga
3025cc41b6
Replace "boost/move/utility.hpp" with "boost/move/utility_core.hpp" to minimize dependencies.
2014-09-17 23:36:23 +02:00
Ion Gaztañaga
f213f55f20
Includes: Updated detail/xxx.hpp includes to core/xxx.hpp, added some missing move/traits.hpp and removed some unused ones.
2014-09-17 21:49:47 +02:00
Robert Matusewicz
f8ebfa472a
Add std::initializer_list to the following containers:
...
* deque
* map
* multimap
* set
* multiset
* list
* slist
Tested on clant and g++
2014-08-27 17:34:25 +02:00
Ion Gaztañaga
a166923e83
Fixed documentation errors with "position", "pos", "hint" and "p" iterators indicating insertion/emplace position.
2014-08-15 17:20:57 +02:00
Ion Gaztañaga
9b25c7134e
* Fixed BOOST_CONTAINER_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment) missing ::value
...
* Optimized insert_equal(ordered_range_t,...) and insert_unique(ordered_unique_range_t, ...) for elements to be inserted in the end.
* Added range insertion overload (non-standard extension) to vector taking the number of elements to avoid reiterations with std::distance.
2014-04-23 23:18:18 +02:00
Ion Gaztañaga
0b720f82b4
Fixed #9916 : "Allocator propagation incorrect in the assignment operator of most".
...
Fixed #9932 : "Missing assignment operator from related static_vector".
Added missing details from issue #9915
2014-04-21 13:59:49 +02:00
Ion Gaztañaga
a4b839628a
Implemented unique associative containers' equal_range using lower_bound_range which is more efficient with heavy comparison functions.
...
Updated benchmark to avoid measuring redundant operations in searches.
2014-01-20 13:20:02 +01:00
Ion Gaztañaga
abc50c7275
Improved unique associative container count function. Improved also flat_xxx's equal_range.
2014-01-19 19:18:57 +01:00
Ion Gaztañaga
a93e23f22a
Inherit set/multiset/map/multimap from tree to avoid redundant instantiations in debug mode and simplify maintenance.
2014-01-05 22:36:01 +01:00
Ion Gaztañaga
01486761a6
Added support for configurable tree-based associative containers. In addition to RB trees, AVL, Scapegoat and Splay trees are experimentally supported.
2014-01-03 13:26:57 +01:00
Ion Gaztañaga
41c2056ec6
- Modified relational operators to be friend inline definitions. This allows compilation checking when instantiating classes, avoids predeclarations and results in less verbose code.
...
- First to make associative containers' tree implementation configurable.
2013-12-23 23:34:28 +01:00