Commit Graph
104 Commits
Author SHA1 Message Date
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 0f448277c5 Remove hash_value from string, Boost.ContainerHash hashes containers by default now. 2024-07-27 22:49:42 +02:00
Ion Gaztañaga a4c4c3b319 Define and use BOOST_CONTAINER_CONSTANT_VAR to support BOOST_INLINE_CONSTEXPR and static const global variables. 2024-06-06 14:39:49 +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 7c74232a40 Remove Boost.StaticAsser dependency 2024-01-02 19:46:05 +01: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 8ae15965ea Fixes #242 ("Issue with string::rfind") 2023-04-18 22:50:30 +02:00
Ion Gaztañaga 552688c7fc Simplify dependencies dropping Boost.Core 2023-02-01 23:00:23 +01:00
Ion Gaztañaga 0aa832cf18 Disable "-Warray-bounds" for GCC12 due to false positives 2023-01-18 23:55:44 +01:00
Ion Gaztañaga 3be89a2910 Disable "-Wmaybe-uninitialized" for false positives in the core section 2022-08-24 14:26:52 +02:00
Ion Gaztañaga f5b2c7ba74 Fixes #214: ("string is not properly null-terminated in assignments") 2022-03-06 22:37:41 +01:00
Ion Gaztañaga ec73bd71e1 Fix -Wshadow warnings 2021-12-29 17:30:15 +01: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 bcd41a1c64 - Add BOOST_CONTAINER_FORCEINLINE to trivial string internal functions
- Fixes #192 ("basic_string::clear() has poor codegen compared to STL implementations")
2021-09-13 14:19:38 +02: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
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 79ae525967 Fixes #133 ("basic_string move constructor with allocator argument has incorrect allocator check") 2019-11-14 15:25:22 +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 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
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 72c7ef7801 Fix assertion produced by previous string changes to avoid UB. 2018-09-18 14:23:31 +02:00
Ion Gaztañaga cce2ef763a Improve short/long representation to avoid aliasing problems and disable "-Wmaybe-uninitialized" for compilers that have false positives. 2018-09-15 01:10:50 +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
Richard Powell 72195ae288 Adding Constructor Template Auto Deduction guides. 2018-05-11 11:35:25 -06: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 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 f49e5d0ad1 Fixes #59 2017-10-20 00:32:09 +02:00
Ion Gaztañaga 2a7b5a70a5 Closes #58 ("Comparing strings does not compile in gcc 7+ in C++17 mode") 2017-10-19 21:53:37 +02:00
Ion Gaztañaga d5aede745e Unify std::binders and lambdas with custom binders 2017-05-26 22:31:26 +02:00
Daniela Engert 36c334f414 replace deprecated/removed C++98 binders by equivalent lambda expressions.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-04-28 19:15:58 +02:00
Ion Gaztañaga 3516da36b0 Doxygen documentation fixes 2017-04-08 00:17:23 +02: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 ce5996c9bd Cosmetic indentation 2017-02-23 19:55:41 +01:00
Ion Gaztañaga 08cce5ebe5 Update basic_string with missing C++11 and C++17 interfaces:
- Default npos arguments in append, insert, compare
- Initializer list support
- Non-const data()
2017-02-21 23:08:11 +01: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
Marshall Clow fde7e1fbdd Add support for boost::string_view into container::basic_string
Conversion from a `basic_string` to a `string_view`, and make all the comparisons work.

Ion - if you like this, I'll work up some tests, too.
2017-02-13 11:35:27 -08: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 2a04243de7 Add safety assertion 2016-06-25 11:05:07 +02:00