15 #ifndef ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ 16 #define ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ 28 namespace inlined_vector_internal {
30 template <
typename Iterator>
32 typename std::iterator_traits<Iterator>::iterator_category,
33 std::forward_iterator_tag>;
35 template <
typename AllocatorType,
typename ValueType,
typename SizeType>
37 SizeType destroy_size) {
38 using AllocatorTraits = std::allocator_traits<AllocatorType>;
47 for (SizeType
i = 0;
i < destroy_size; ++
i) {
56 void* memory =
reinterpret_cast<void*
>(destroy_first);
57 size_t memory_size =
sizeof(ValueType) * destroy_size;
58 std::memset(memory, 0xab, memory_size);
62 template <
typename T,
size_t N,
typename A>
67 using pointer =
typename allocator_type::pointer;
69 using reference =
typename allocator_type::reference;
72 using size_type =
typename allocator_type::size_type;
88 return reinterpret_cast<pointer>(
108 return std::addressof(
metadata_.template get<0>());
112 return std::addressof(
metadata_.template get<0>());
172 #endif // ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ const_pointer GetAllocatedData() const
void SetInlinedSize(size_type size)
absl::aligned_storage_t< sizeof(value_type), alignof(value_type)> InlinedDataElement
typename allocator_type::size_type size_type
Storage(const allocator_type &alloc)
std::reverse_iterator< const_iterator > const_reverse_iterator
typename std::aligned_storage< Len, Align >::type aligned_storage_t
typename allocator_type::value_type && rvalue_reference
typename allocator_type::const_reference const_reference
typename allocator_type::value_type value_type
pointer GetAllocatedData()
typename allocator_type::reference reference
size_type allocated_capacity
size_type GetAllocatedCapacity() const
std::allocator_traits< allocator_type > AllocatorTraits
void SwapSizeAndIsAllocated(Storage *other)
std::allocator< absl::str_format_internal::FormatArgImpl > allocator_type
const_pointer const_iterator
static std::function< void(void *, Slot *)> destroy
std::reverse_iterator< iterator > reverse_iterator
void SwapAllocatedSizeAndCapacity(Storage *other)
std::is_convertible< typename std::iterator_traits< Iterator >::iterator_category, std::forward_iterator_tag > IsAtLeastForwardIterator
InlinedDataElement inlined_data[N]
static char data[kDataSize]
allocator_type * GetAllocPtr()
bool GetIsAllocated() const
void SetAllocatedSize(size_type size)
void swap(absl::InlinedVector< T, N, A > &a, absl::InlinedVector< T, N, A > &b) noexcept(noexcept(a.swap(b)))
void AddSize(size_type count)
typename allocator_type::pointer pointer
void SetAllocatedCapacity(size_type capacity)
void DestroyElements(AllocatorType *alloc_ptr, ValueType *destroy_first, SizeType destroy_size)
typename allocator_type::difference_type difference_type
typename allocator_type::const_pointer const_pointer
const allocator_type * GetAllocPtr() const
void SetAllocatedData(pointer data)
size_type & GetSizeAndIsAllocated()
size_type GetSize() const
std::allocator< int > alloc
const size_type & GetSizeAndIsAllocated() const
const_pointer GetInlinedData() const