aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/include/__split_buffer
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-07-16 10:46:24 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-08-30 06:36:40 +0200
commitd9f0fbf9838060b1e8c2ec0df21b43e75430350f (patch)
tree1ad5976b5e0233a964a7c7381b3ccac8bbc9697e /lib/libcxx/include/__split_buffer
parente84e9d3a01e4332ad6b7a239c74d823f283d7f8f (diff)
downloadzig-d9f0fbf9838060b1e8c2ec0df21b43e75430350f.tar.gz
zig-d9f0fbf9838060b1e8c2ec0df21b43e75430350f.zip
libcxx: update to LLVM 21
Diffstat (limited to 'lib/libcxx/include/__split_buffer')
-rw-r--r--lib/libcxx/include/__split_buffer11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libcxx/include/__split_buffer b/lib/libcxx/include/__split_buffer
index a8f679cc30..21e58f4abc 100644
--- a/lib/libcxx/include/__split_buffer
+++ b/lib/libcxx/include/__split_buffer
@@ -28,6 +28,7 @@
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_nothrow_assignable.h>
#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_replaceable.h>
#include <__type_traits/is_swappable.h>
#include <__type_traits/is_trivially_destructible.h>
#include <__type_traits/is_trivially_relocatable.h>
@@ -72,6 +73,10 @@ public:
__libcpp_is_trivially_relocatable<pointer>::value && __libcpp_is_trivially_relocatable<allocator_type>::value,
__split_buffer,
void>;
+ using __replaceable _LIBCPP_NODEBUG =
+ __conditional_t<__is_replaceable_v<pointer> && __container_allocator_is_replaceable<__alloc_traits>::value,
+ __split_buffer,
+ void>;
pointer __first_;
pointer __begin_;
@@ -233,7 +238,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __split_buffer<_Tp, _Allocator>::__invariants
// Postcondition: size() == size() + __n
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n) {
- _ConstructTransaction __tx(&this->__end_, __n);
+ _ConstructTransaction __tx(std::addressof(this->__end_), __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(__alloc_, std::__to_address(__tx.__pos_));
}
@@ -248,7 +253,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp, _Allocator>::__construct_
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x) {
- _ConstructTransaction __tx(&this->__end_, __n);
+ _ConstructTransaction __tx(std::addressof(this->__end_), __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(__alloc_, std::__to_address(__tx.__pos_), __x);
}
@@ -283,7 +288,7 @@ template <class _Tp, class _Allocator>
template <class _ForwardIterator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
__split_buffer<_Tp, _Allocator>::__construct_at_end_with_size(_ForwardIterator __first, size_type __n) {
- _ConstructTransaction __tx(&this->__end_, __n);
+ _ConstructTransaction __tx(std::addressof(this->__end_), __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__first) {
__alloc_traits::construct(__alloc_, std::__to_address(__tx.__pos_), *__first);
}