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 GetInlinedData() 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
size_type GetSize() const
typename allocator_type::const_reference const_reference
typename allocator_type::value_type value_type
pointer GetAllocatedData()
typename allocator_type::reference reference
bool GetIsAllocated() const
size_type allocated_capacity
std::allocator_traits< allocator_type > AllocatorTraits
const size_type & GetSizeAndIsAllocated() const
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()
const allocator_type * GetAllocPtr() 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)
size_type GetAllocatedCapacity() const
const_pointer GetAllocatedData() const
typename allocator_type::difference_type difference_type
typename allocator_type::const_pointer const_pointer
void SetAllocatedData(pointer data)
size_type & GetSizeAndIsAllocated()
std::allocator< int > alloc