Commit Graph
232 Commits
Author SHA1 Message Date
Tobias Ludwig b7355bb2b4 add missing warning re-enabling include
fixes msvc warning C5032: "detected #pragma warning(push) with no corresponding #pragma warning(pop)"
2018-10-29 22:31:52 +01:00
Ion Gaztañaga 76b181f024 Make some sanitizers happier avoiding wraparound. 2018-09-29 09:58:52 +02:00
Ion Gaztañaga 0b39d57b6a Enable again push_back/push_front. 2018-09-29 09:58:24 +02:00
Ion Gaztañaga c0a1c5cfc0 Fix invalid multiallocation_chain iterator increment after memory was overwritten. 2018-09-29 09:57:36 +02:00
Ion Gaztañaga 92e5ffb151 Add BOOST_LIKELY hints 2018-09-26 01:11:34 +02:00
Ion Gaztañaga e787c4a24d Use uninitialized memory for node-based containers to improve aliasing conformance 2018-09-26 01:10:37 +02:00
Ion Gaztañaga 1e509c308e Add ASAN detection macro (BOOST_CONTAINER_ASAN) 2018-09-26 01:09:44 +02:00
Ion Gaztañaga d242914572 Forward declare equal_to 2018-09-26 01:09:19 +02:00
Ion Gaztañaga 09e757ee1c Reenable some commented operations 2018-09-26 01:09:02 +02:00
Ion Gaztañaga ffbf76df00 Add more constructor overloads to support future unordered containers. 2018-09-15 01:23:23 +02:00
Ion Gaztañaga 25a109f8d2 Export boost::move_detail::nat2 and boost::move_detail::nat3 to container detail namespace 2018-09-15 01:22:18 +02:00
Ion Gaztañaga 60aea31db7 Make value_to_node_compare return type configurable 2018-09-15 01:21:47 +02:00
Ion Gaztañaga 43c0d7a731 Fix some type punning warnings, avoiding forming a reference to non-constructed objects 2018-09-15 01:20:43 +02:00
Ion Gaztañaga 5ab5c7de63 Add noexcept_if to tree::swap 2018-09-15 01:18:27 +02:00
Ion Gaztañaga 6504af8708 Disable false positives on "-Wstringop-overflow" and "-Warray-bounds" in release mode 2018-09-15 01:15:25 +02:00
Ion Gaztañaga f28fe5d33e Fix some type punning warnings, avoiding forming a reference to non-constructed objects 2018-09-15 00:52:18 +02:00
Ion Gaztañaga d4ff624264 Fixes GitHub #82: "Function definition in header file". 2018-08-29 22:19:29 +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 62a8b6666e Disable -Wclass-memaccess for GCC 8 2018-06-16 16:35:35 +02:00
Ion Gaztañaga 4faa05e36c More traits to support additional triviality for pair. 2018-06-16 14:45:20 +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 ed50d14e9e Change forward_as_tuple to forward_as_tuple_impl as there are ambiguities when std headers are included. It's is used only in the pair test 2018-05-14 11:49:35 +02:00
Ion Gaztañaga 48c21e3187 Implemented C++14's heterogeneous lookups. 2018-05-01 14:55:24 +02:00
Ion Gaztañaga 04b0791593 * Fixed adaptive pool bugs
* Improved adaptive pool testing enabling invariant checking in debug mode.
* New compile-time and runtime calculated parameters for adaptive_pool.
* New test comparing set with default allocator or adaptive pool
2018-04-29 12:42:04 +02:00
Ion Gaztañaga 42c6be5887 Fixes Trac #13533: "Boost vector resize causes assert(false)" 2018-04-29 12:37:35 +02:00
Ion Gaztañaga f0736ba73a Use new "data" member char array in aligned_storage::type for placement new, to avoid breaking strict aliasing. 2018-01-30 14:20:52 +01:00
Ion Gaztañaga feeafbe9f3 Use pdqsort to sort unique values. 2017-12-31 21:08:19 +01: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 3c6f4ea2ed Forward declare correction vector iterator 2017-12-20 13:12:47 +01: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
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 6530b7870f Use BOOST_FALLTHROUGH instead of the broken typo version 2017-08-27 01:59:32 +02:00
Ion Gaztañaga c748e90b6b Remove unused to_raw_pointer file 2017-06-26 00:48:00 +02:00
Ion Gaztañaga d7eaedc1a9 Merge branch 'master' of https://github.com/garyfurnish/container into garyfurnish-master 2017-06-06 13:14:18 +02:00
Gary Furnish e0aaf744a5 Fix integer rollover that triggers clang ubsan when U is unsigned 2017-06-05 18:18:38 -06:00
Ion Gaztañaga d5aede745e Unify std::binders and lambdas with custom binders 2017-05-26 22:31:26 +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
Mehdi Amini 40451e4bf7 Add variant of map constructors to avoid useless extra allocator copy when using initializer list
Many existing constructors have this form:

  map(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type())

The issue is that a temporary allocator_type is constructed, and
passed to the base class where it is used to copy-constructed the
rebound allocator.
This temporary allocator_type here is always destroyed at the end
of the map() constructor. For stateful allocators this is not
desirable.
The solution is to adopt what libc++ is doing and have to constructors:

  map(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a)

and

  map(std::initializer_list<value_type> il, const Compare& comp = Compare())

This way, unless an allocator is provided by the client, no extra temporary
creation/destruction occurs.
2017-05-08 12:39:06 -07:00
Ion Gaztañaga 1d727753e2 Use directly boost::movelib::to_raw_pointer/iterator_to_raw_pointer 2017-04-07 16:07:00 +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 cdb022fda2 Fix ambiguous constructor calls for piecewise_construct and Boost vs std tuples 2017-04-05 16:04:53 +02:00
Ion Gaztañaga 01d7c71ea8 Fix node_handle bugs:
-> Bad allocator destruction in swap
-> Wrong assertion in operator=
-> Make dangerous functions private

Added full testsuite.
2017-04-02 00:20:38 +02:00
Ion Gaztañaga 865c69bab7 Changed string_view interoperability to a templated solution in order to support also std::string_view.
Added missing members and testcases.
2017-02-21 14:27:18 +01:00
Ion Gaztañaga 1404933491 Delete unused hash table 2017-02-06 11:50:53 +01:00
Ion Gaztañaga 23e9e8b494 Fix copyright notice. 2017-01-12 14:58:44 +01:00
Ion Gaztañaga f71fee5140 Merge branch 'inspection_report' of https://github.com/zerotypos-found/container into zerotypos-found-inspection_report 2017-01-12 14:53:20 +01:00
Ion Gaztañaga 79f5977688 Fixes Ticket #12749 container::pmr::polymorphic_allocator compilation error 2017-01-12 14:49:31 +01:00