Ion Gaztañaga
7972bb2c97
Fixes #305 : ("Warnings with -Wstrict-prototypes").
2025-08-26 00:35:29 +02:00
Ion Gaztañaga
862ae36735
Fixes #310 ("flat_map: Mention correct type in documentation of emplace and emplace_hint"
2025-08-25 23:13:16 +02:00
Ion Gaztañaga
96653536f1
Fixes #309 ("Performance regression of boost::container::static_vector introduced in boost v1.86")
2025-08-14 20:14:32 +02:00
Ion Gaztañaga
b6a2a6ba6a
Merge pull request #307 from TheJCAB/fix-MSVC-C4146-warnings
...
Fix all instances of MSVC warning C4146 (unsigned negation)
2025-08-12 19:12:50 +02:00
Juan Carlos Arevalo Baeza (JCAB)
18f29c6eda
Fix all instances of MSVC warning C4146 (unsigned negation)
...
Unsigned negation is a well-defined operation in C and C++ and it is commonly used when doing bit manipulation of unsigned integers, because it builds a high-pass bitmask.
For instance, if `X` is known to be a power of two, `-X` is precisely the mask needed to align a value down to a multiple of `X` by means of a bit-wise `&` operation.
However, it can occasionally be flagging a bug, when the original intent was mathematical negation. For this reason, an explicit fix is preferred to suppressing this warning.
This change fixes all the instances of unsigned negation of the form `-X` to `0 - X`.
It also includes a drive-by spot-fix for the macro `left_bits(x)` whose parameter was missing the usual parenthesis. This was benign in all the uses of the macro.
2025-07-30 15:35:34 -07:00
Ion Gaztañaga
e680bd79a2
Fix class invariant comment. In this implementation default constructed deque make no allocation so in that case start and finish are singular iterators.
2025-07-30 23:57:26 +02:00
Ion Gaztañaga
e8baf848bc
Fixes #250 ("Custom container leads to "invalid use of incomplete type" for "struct boost::container::dtl::container_rebind"")
2025-05-21 12:05:35 +02:00
Ion Gaztañaga
d12528d972
Disable "-Wdeprecated-declarations" for max_size which was deprecated in the standard.
2024-12-23 21:53:47 +01:00
Ion Gaztañaga
a6a41e2356
FIxes #297 ("flat_map::try_emplace does not compile if allocator has construct")
2024-12-22 22:02:07 +01:00
Ion Gaztañaga
1f543216d4
Disable Wdeprecated-declarations when using deprecated allocator
2024-11-28 13:17:24 +01:00
Ion Gaztañaga
3e70ecfa80
Avoid comparing iterators that could have been invalidated after erase()
2024-11-24 22:31:38 +01:00
Ion Gaztañaga
a0848ceaf1
Fixes #295 ("Bug in small_vector::swap")
2024-11-21 15:49:08 +01:00
Ion Gaztañaga
83b8d5748d
Use #<boost/move/detail/std_ns_begin/end.hpp> before using BOOST_MOVE_STD_NS_BEG
2024-10-19 22:48:58 +02:00
Ion Gaztañaga
af58c7d226
Added stored_size option to small_vector
2024-10-13 00:29:12 +02:00
Ion Gaztañaga
13603d7de1
Added stored_size option to static_vector
2024-10-12 23:22:59 +02:00
Ion Gaztañaga
c4cfad7402
Disable unreachable code warning for MSVC
2024-10-01 00:17:40 +02:00
Ion Gaztañaga
78d1a30e65
Fixes #261 ('"End iterators are not dereferencable")
2024-09-30 23:18:41 +02:00
Ion Gaztañaga
18a86594b6
Fix some Wshadow warnings for old GCCs
2024-09-30 15:59:00 +02:00
Ion Gaztañaga
4cc14fc42c
Propagate the potentially "void" allocator to the underlying vector to shorten symbol name lengths.
2024-09-11 21:22:54 +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
72a6b1e00e
Fixes #288 ("Compile error when using flat_map::extract_sequence with small_vector")
2024-09-09 10:54:14 +02:00
Ion Gaztañaga
69136f9967
Optimize merge and sort with the utility unused_storage
2024-09-09 00:40:54 +02:00
Ion Gaztañaga
bd8c8b0327
Add unused_storage optimization function
2024-09-09 00:37:47 +02:00
Ion Gaztañaga
48acf451b8
Fix incorrect invariant check for iterators. We don't have a proper comparator for them, we need to wait until they are inserted in the sequence before checking invariants.
2024-09-08 01:51:16 +02:00
Ion Gaztañaga
ceadad2e6e
Avoid rebinding the allocator o container if std::pair is movable (impl_pairt_ is the same type as std_pair_t)
2024-09-08 00:49:18 +02:00
Ion Gaztañaga
419b1e9f09
Fix merge[_unique] handling of input iterators. It was not handled at compile time, leading to compilation errors.
2024-09-08 00:47:43 +02:00
Ion Gaztañaga
19a2f5ea95
Fix WConversion warning for DetectMember_*
2024-08-22 11:42:29 +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
8d0dc6daeb
Fixes #285 ("devector<>::push_front asserts after clear()")
2024-07-15 10:41:42 +02:00
Ion Gaztañaga
ebf698f8a3
Adjust BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED since clang claims to be GCC 4.2 but supports this feature.
2024-07-01 01:01:02 +02:00
Ion Gaztañaga
bdc734f1e0
Avoid noisy warnings when instantiating BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH
2024-06-30 23:06:08 +02:00
Ion Gaztañaga
df03ffc8ec
Fixes #241 : flat_map should support same interface as std::map
2024-06-28 14:04:00 +02:00
Ion Gaztañaga
a070ce2325
Fixes #245 ("flat_tree::insert ordered range doesn't assert sorting")
2024-06-14 13:38:50 +02:00
Ion Gaztañaga
2d097fe45c
Roll back and use dtl::value_init to maximize compatibility between std versions
2024-06-14 12:37:12 +02:00
Ion Gaztañaga
d1d8c43c2d
Add detail/pair header
2024-06-13 22:46:37 +02:00
Ion Gaztañaga
acd4f41eda
Remove unneeded header
2024-06-13 22:46:23 +02:00
Ion Gaztañaga
7c9fb0d764
Include pair.hpp since dtl::pair is used
2024-06-13 14:36:18 +02:00
Ion Gaztañaga
a331d3387f
Include detail/is_pair.hpp since forward declares boost::tuples::tuple
2024-06-13 14:32:56 +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
13be16a0c8
Don't use default-constructed KeyNodeCompare to support stateful comparison objects
2024-06-05 11:20:11 +02:00
Ion Gaztañaga
24c978b550
Clarify clear() does not alter capacith()
2024-06-04 14:00:31 +02:00
Ion Gaztañaga
dad179ddf5
Fix incorrect memory free order in prot_shrink_to_fit_small, fixing a potential memory leak
2024-06-03 00:14:00 +02:00
Ion Gaztañaga
c7702d20eb
Reformat small inline functions
2024-06-03 00:12:56 +02:00
Ion Gaztañaga
aa473160df
Remove unused make_unique.hpp
2024-06-03 00:12:09 +02:00
Ion Gaztañaga
9da5dc49f7
Refactor move constructor and swap implementations for small_vector as in some cass unnecesary heap allocation was performed. Add tests for this.
2024-06-02 13:08:18 +02:00
Ion Gaztañaga
4142050048
Disable Wstringop-xxx false positives also in newer GCCs
2024-06-02 13:06:33 +02:00
Ion Gaztañaga
0219333fa1
Disable strict aliasing for C++03 implementations as type-punning is used to make value_type movable.
2024-05-30 23:07:57 +02:00
Ion Gaztañaga
2f0155224b
Disable Wstringop-overflow also in GCC 11
2024-05-27 22:50:47 +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