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
482f0911e1
Use #include <boost/intrusive/detail/hash_combine.hpp> instead of #include <boost/container_hash/hash.hpp> to avoid pulling unneeded STL headers.
2021-01-05 00:07:02 +01:00
Ion Gaztañaga
95538bfdc2
Update static assert test and remove unneeded <string> include.
2021-01-02 22:47:19 +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
5430c15ad9
Correct includes: <algorithm> is not used and <string> is needed for char_traits
2021-01-02 16:25:25 +01:00
Ion Gaztañaga
d6a270e8e1
Correct "throws" part of several operations as the library by default throws its own exception types.
2021-01-02 16:24:37 +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
621cd3a0ab
Avoid using inheriting constructors and initializer_list::cbegin/cend to be nicer with older compilers
2021-01-01 23:44:56 +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
b17dabf47a
Fixes #141 ('small_vector does not propagate no throw properties of move operation of contained type')
2020-12-30 00:19:22 +01: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
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
2a458005d9
Fixes #171 ("deque::clear() uses undefined behaviour")
2020-11-10 10:08:03 +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
Peter Dimov
44c76d1187
Remove BOOST_CONTAINER_DECL from memory_resource
2020-10-24 23:51:15 +03: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
Ion Gaztañaga
31d7f3875f
Fixes #167 ("error: the address of 'msg' will always evaluate as 'true' warning with GCC 4.4").
2020-10-21 22:41:12 +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
3da7877dc0
Fixes #158 (".bak file in git")
2020-08-31 22:23:25 +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
0b297019ec
Fixes #161 : ("polymorphic_allocator(memory_resource*) non-standard extension causes headache")
2020-08-31 13:37:11 +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
5a52472cd0
Make a different version for single value proxies in priv_insert_forward_range_expand_forward and force-inline only that version
2020-08-11 23:50:47 +02:00
Ion Gaztañaga
5d100cb45f
Add BOOST_CONTAINER_FORCEINLINE to trivial functions
2020-08-11 23:50:08 +02:00
Ion Gaztañaga
c2a4ed70d9
Avoid unsigned underflow, legal but flagged as suspicious by several tools.
2020-08-11 23:49:48 +02:00
Ion Gaztañaga
fb88180001
- Change priv_insert_forward_range_expand_forward position to raw pointer to be more homogeneous with the rest of similar functions.
...
- Remove some unused variable warnings due to BOOST_IF_CONSTEXPR additions.
2020-08-10 11:18:36 +02:00
Ion Gaztañaga
ebcd0222b4
Integrate and adapt "devector's", from Thaler Benedek's implementation.
2020-08-10 00:16:58 +02:00
Ion Gaztañaga
844b779a7d
Clean-up insertion code and speed upt single value insertion for proxies having that trait.
2020-08-10 00:02:26 +02:00
Ion Gaztañaga
bff516315b
Add BOOST_CONTAINER_FORCEINLINE to more trivial functions
2020-08-10 00:00:51 +02:00
Ion Gaztañaga
e02b5c9bde
Add "back_free_capacity" utility
2020-08-09 23:54:52 +02:00
Ion Gaztañaga
d271c6384d
Use "set_stored_size" to avoid conversion warnings when updating member "stored_size_type types.
2020-08-09 23:54:24 +02:00
Ion Gaztañaga
c48edfe7bd
Reenabled the following warnings in MSVC to detect errors in the implementation:
...
4244 // possible loss of data
4267 // conversion from "X" to "Y", possible loss of data
4702 // unreachable code
2020-08-09 23:49:15 +02:00
Ion Gaztañaga
978f1c426d
Generalize "clamp_by_stored_size_type" to be able to reuse it in other containers
2020-08-09 23:47:41 +02:00
Ion Gaztañaga
cc51aa2e49
Add BOOST_CONTAINER_FORCEINLINE to trivial functions and add is_single_value_proxy attribute to single value proxies. This trait can be used by insertion functions to optimize operations at compile time.
2020-08-09 23:45:13 +02:00
Ion Gaztañaga
4eb93761db
Fix "-Wdeprecated-copy" warnings
2020-08-09 23:28:07 +02:00
Ion Gaztañaga
c08ead7f4b
Add BOOST_CONTAINER_DISABLE_NOINLINE
2020-08-09 23:27:12 +02:00
Ion Gaztañaga
e0c7cb99b3
Fix possible unsigned underflow warnings.
2020-08-09 23:26:34 +02:00
Ion Gaztañaga
716ade8e56
Add BOOST_CONTAINER_FORCEINLINE to destroyers' trivial functions
2020-08-09 23:25:31 +02:00
Ion Gaztañaga
06417de498
Fixes #125 ("flat_map doc misleading complexity").
2020-07-13 12:31:58 +02:00
Ion Gaztañaga
2d9d28b81e
Fixed #128 ("moved from small_vector and static_vector calls destructor on elements in static part")
2020-07-12 13:48:38 +02:00
Ion Gaztañaga
069351adfc
Fixes #126 ("flat_set.hpp and set.hpp in pmr have the same header guard")
2020-07-12 12:53:47 +02:00
Ion Gaztañaga
98b59db5fd
Fixes #149 : ("InitializeCriticalSectionEx returns "BOOL" (int)")
2020-07-12 12:44:31 +02:00