Commit Graph
106 Commits
Author SHA1 Message Date
Ion Gaztañaga 18a86594b6 Fix some Wshadow warnings for old GCCs 2024-09-30 15:59:00 +02:00
Ion Gaztañaga 49440c3525 Add compile-time check to make sure allocator_type::value_type and container's value_type are the same type. 2024-09-10 23:50:24 +02:00
Ion Gaztañaga 0977e6b1d4 Use BOOST_STATIC_CONSTEXPR where applicable 2024-06-06 00:08:00 +02:00
Ion Gaztañaga 397fbda8be Fixes #280 ("Several containers don't support non-movable types when move assigning") 2024-05-23 23:28:54 +02:00
Ion Gaztañaga 292bab35c6 Revert accidental commit 2024-05-21 14:11:30 +02:00
Ion Gaztañaga 59d760c08b Document block_size option in deque_options. 2024-05-21 14:08:36 +02:00
Ion Gaztañaga 978bbb113a Clean force_ptr usage and use launder_cast 2024-04-15 12:51:15 +02:00
Ion Gaztañaga 1a4a205ea6 Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat 2023-05-10 22:09:01 +02:00
Ion Gaztañaga 552688c7fc Simplify dependencies dropping Boost.Core 2023-02-01 23:00:23 +01:00
Ion Gaztañaga 49a028bfe9 Add missing iterator_to_raw_pointer include 2022-08-24 14:47:51 +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 dad2cb2d02 Support GCC's -Wconversion -Wfloat-conversion -Warith-conversion -Wsign-conversion warnings. 2021-10-16 15:57:47 +02:00
Ion Gaztañaga 1dc1e74668 Remove std::pair dependency for multiallocation_chain 2021-01-15 20:43:27 +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
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 27c1fea452 Fixes #136 ("List of non BOOST-prefixed macros") 2019-12-19 05:29:46 +01: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 5f0ce60b39 Fixes #88 ("Implement C++17 MoveAssignable requirements for self-move assignments") 2019-04-30 18:05:50 +02:00
Ion Gaztañaga 71dfc80dda Add BOOST_CONTAINER_FORCEINLINE to stable_vector_iterator's copy constructor 2019-04-24 22:50:11 +02:00
Ion Gaztañaga 8dfaee7434 Define nat in iterators to allow explicit instantiation of iterators. 2019-03-05 13:52:08 +01:00
Ion Gaztañaga da21340323 Fix #105 ("Fix gcc -Wdeprecated-copy") 2019-03-05 12:15:42 +01:00
Ion Gaztañaga 2b3775985e Add BOOST_CONTAINER_FORCEINLINE 2019-03-05 12:11:43 +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 cb21746b80 Rewrite CTAD and SFINAE-out overloads as the standard requires 2018-11-12 22:52:45 +01:00
Ion Gaztañaga 3a2f61fdb0 Merge branch 'container-misc-typos' of https://github.com/luzpaz/container into luzpaz-container-misc-typos 2018-11-10 23:32:42 +01:00
Ion Gaztañaga e787c4a24d Use uninitialized memory for node-based containers to improve aliasing conformance 2018-09-26 01:10:37 +02:00
luz.paz a6ac16d0c4 container: misc-typos
Found via `codespell -q 3 -L iff,nd`
2018-09-23 15:54:39 -04: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
Richard Powell 72195ae288 Adding Constructor Template Auto Deduction guides. 2018-05-11 11:35:25 -06: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 1d727753e2 Use directly boost::movelib::to_raw_pointer/iterator_to_raw_pointer 2017-04-07 16:07:00 +02:00
Ion Gaztañaga 0617d0e538 Implemented P0084R2 (Emplace Return Type) 2016-08-29 16:53:44 +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 7764e05444 Changes to support GCC 3.4 2015-10-12 18:51:08 +02:00
Ion Gaztañaga 85b2ed509b Added debug assertions via BOOST_ASSERT to check preconditions in several members. All checks are O(1) 2015-09-18 14:39:17 +02:00
Ion Gaztañaga b2c4f3c4cb Fixed shadowing warning 2015-09-07 19:07:32 +02:00
Ion Gaztañaga acf4484fc7 Merge branch 'fix-doc' of https://github.com/kariya-mitsuru/container into kariya-mitsuru-fix-doc 2015-06-09 22:35:29 +02:00
Ion Gaztañaga ef54ab8784 Avoid branches in capacity() 2015-06-04 11:39:10 +02:00
Mitsuru Kariya d94f52ef7d fix stable_vector#index_of's doxygen comment 2015-06-02 11:22:22 +09:00
Ion Gaztañaga 4cdb8caca4 Merge branch 'patch-1' of https://github.com/timsong-cpp/container into timsong-cpp-patch-1 2015-04-19 11:05:51 +02:00
timsong-cpp 6bf6c553fd Fix bug in capacity()
See http://stackoverflow.com/q/29727368/2756719; the bit-twiddling version is not equivalent to the original `return (index_size ? (index_size - ExtraPointers + extra_capacity) : index_size);`; it ends up subtracting, rather than adding, `extra_capacity`.
2015-04-19 04:30:08 -04:00
Ion Gaztañaga 6477543f3b Updated to new meta-functions reused from Intrusive/Move 2015-04-14 15:21:46 +02: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 10d027aa9c Include boost/config.hpp before testinG BOOST_HAS_PRAGMA_ONCE. 2015-02-02 15:26:53 +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