Commit Graph

53 Commits

Author SHA1 Message Date
Ion Gaztañaga
9201bbf83b - Modify dlmalloc_allocation_command to use alignment info, this requires modifying the dlmalloc_ext wrapper library.
- Replace all dlmalloc_malloc uses with dlmalloc_allocation_command to support overaligned types in array allocations.
2026-01-19 01:06:56 +01:00
Ion Gaztañaga
1e1741ce63 Delete unused includes 2026-01-19 01:01:53 +01:00
Ion Gaztañaga
7ec7de921c Remove unused or unneeded _id member 2024-05-30 23:12:52 +02:00
Ion Gaztañaga
f46ee4391f Protect struct POD definition with the same macro as the test 2024-05-28 10:51:33 +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
56cc38f761 Update test_iterator_random test for vector-like containers 2024-04-15 11:57:44 +02:00
Ion Gaztañaga
7c74232a40 Remove Boost.StaticAsser dependency 2024-01-02 19:46:05 +01:00
Ion Gaztañaga
b14e7cedb0 libc++ up to version 14 does not support span deduction guides 2023-05-16 12:13:15 +02:00
Ion Gaztañaga
5cc9617487 Fixes #233 ("Can't std::move small_vector with move-only type") 2023-03-13 10:06:53 +01:00
Giuseppe D'Angelo
b694ada294 Do not memset(0) POD types
"POD" is the wrong type trait to determine if something can be safely
zero-filled in order to achieve zero initialization. Consider a type
like

  struct POD { int POD::*ptr; };

This is a POD; its value initialization needs to value initialize the
member, and since it's a pointer, that's zero initialization, and that's
setting the pointer to null.

On Itanium, a null pointer to data member is not zero filled; it actually
has the value -1u.

Hence, zero-filling via memset(0) a POD object like the one above is
erroneous. Unfortunately there is no type trait in C++ that we can use to
know if a given datatype can be value initialized by zero-filling -- we
can check for trivial constructability, but that's a necessary
condition, not a sufficient one (POD above is also trivially
constructible).

The test is disabled on MSVC because of a compiler bug.

Fixes #238
2023-02-02 11:29:53 +01:00
Ion Gaztañaga
d98c21fc33 Fix potentially not-initialized variable warning 2022-08-24 14:31:28 +02:00
Ion Gaztañaga
8bb53bbed2 Make test_span_conversion() test a bit more clear 2022-01-04 16:42:43 +01:00
Ion Gaztañaga
ea3521bf14 Fix -Wshadow warnings 2021-12-27 14:40:29 +01:00
Ion Gaztañaga
ad7167c564 Fixes #150 ("Use std::contiguous_iterator_tag if available"), tested in MSVC and GCC. 2021-04-21 00:43:31 +02:00
Ion Gaztañaga
974e8e641a Fix "-Wdeprecated-copy" warnings 2020-08-09 23:21:46 +02:00
Ion Gaztañaga
4f37a023b0 Enable user warnings in tests to be able to fix them. 2020-07-12 11:06:01 +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
Roland Dreier
1eb591e85c Fix deallocating never-allocated storage in vector.merge()
If merge() is called on an empty vector, then priv_merge_in_new_buffer() will
call deallocate() with size 0 on the old (not-yet-allocated) vector storage.
This violates the Allocator requirement that the pointer passed to deallocate()
must have come from a call to allocate() with the same size.

Fix this by checking old_cap against 0, and also add a unit test for this bug.
2019-02-23 18:46:06 -08: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
9bba03450f Update changelog and test function for GitHub #81 ("Vector with custom allocator does not support value types with operator&") 2018-11-11 02:03:30 +01:00
Ion Gaztañaga
fe85038ebe Simplify redundant tested variants in functional tests.
Move explicit instantiations from functional tests to "explicit_inst_xxx".
2018-09-25 09:08:24 +02:00
Richard Powell
72195ae288 Adding Constructor Template Auto Deduction guides. 2018-05-11 11:35:25 -06:00
Daniela Engert
13a227a96e std::allocator<void> is deprecated in C++17
silence the deprecation warning

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-02-02 15:59:39 +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
21fbd71ef3 Delete BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER 2017-08-27 01:03:24 +02:00
Ion Gaztañaga
33b331da38 Reduce redundant instantiations to improve test build times 2016-02-23 13:29:46 +01:00
Ion Gaztañaga
7764e05444 Changes to support GCC 3.4 2015-10-12 18:51:08 +02:00
Ion Gaztañaga
d01cb72b3f Add iterator tests 2015-04-14 15:03:19 +02:00
Ion Gaztañaga
6c5e527c60 Improve allocator propagation test with new constructors and refactor code to avoid too many wrappers. 2015-02-26 00:32:32 +01:00
Ion Gaztañaga
36c8f81e42 Add placement new operator to avoid <new> unnecessarily. 2015-01-10 10:58:08 +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
5d6123152c Removed unneeded includes. Refactores std forward declarations 2014-10-04 09:05:04 +02:00
Ion Gaztañaga
e697122a2c Updated tests to avoid manual memory management. Replaced with unique_ptr and a reference. Normalized CheckEqualContainers to use references instead of pointers. 2014-09-23 17:30:31 +02:00
mikael
59b46cd338 Fixes a small issue that prevented the use of iterators of containers of incomplete types. Added iterators of incomp-types to unit-tests. 2014-09-21 19:46:58 -04: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
Robert Matusewicz
ac4dde2c6e add std::initializer_list support for boost::container::vector 2014-08-15 20:25:16 +02:00
Ion Gaztañaga
fc8507b48c Some comments in the testcases separating test groups. 2013-12-26 13:10:54 +01:00
Ion Gaztañaga
f2947c115e Changes during Git migration:
- Added Extended Allocator support for Boost.Container.
- Improved Doxygen generated reference
- Fixed ticket #9338 ("VS2005 compiler errors in swap() definition after including container/memory_util.hpp")
2013-12-23 10:47:20 +01:00
Ion Gaztañaga
14f092ab00 Default initialization for vector-like containers
Complexity guarantees for associative container constructors and ordered input ranges
Added benchmark for associative containers
Fixes #9166

[SVN r85964]
2013-09-26 18:05:25 +00:00
Ion Gaztañaga
3d249fa728 Implemented SCARY iterators for all containers
[SVN r85308]
2013-08-11 21:36:19 +00:00
Ion Gaztañaga
9b0a73fc32 Add experimental option to define "vector::iterator" as "pointer"
[SVN r83140]
2013-02-24 20:34:15 +00:00
Ion Gaztañaga
f56ec3886b Use explicit instantiation for iterators defined outside the class in order to detect compilation errors.
[SVN r82815]
2013-02-11 11:31:59 +00:00
Ion Gaztañaga
6d4af66add * Improved vector's insertion performance.
*  Changed again experimental multiallocation interface for better performance (still experimental).
*  Added no exception support for those willing to disable exceptions in their compilers.
*  Fixed GCC -Wshadow warnings.
*  Replaced deprecated BOOST_NO_XXXX with newer BOOST_NO_CXX11_XXX macros.


[SVN r81519]
2012-11-24 21:09:10 +00:00
Ion Gaztañaga
082c47b721 Trailing whitespaces
[SVN r78519]
2012-05-20 10:03:06 +00:00
Ion Gaztañaga
ed523da2bc Added equal_range and range insertion test prototypes.
[SVN r77908]
2012-04-11 06:24:09 +00:00
Ion Gaztañaga
0098adea15 Added documentation on scoped allocators
[SVN r77679]
2012-03-31 20:57:45 +00:00
Ion Gaztañaga
90740ea8ea Fixed documentation comments
[SVN r77505]
2012-03-23 17:51:44 +00:00