template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
class FixedArray
Defined at line 77 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
-----------------------------------------------------------------------------
FixedArray
-----------------------------------------------------------------------------
A `FixedArray` provides a run-time fixed-size array, allocating a small array
inline for efficiency.
Most users should not specify the `N` template parameter and let `FixedArray`
automatically determine the number of elements to store inline based on
`sizeof(T)`. If `N` is specified, the `FixedArray` implementation will use
inline storage for arrays with a length
<
= `N`.
Note that a `FixedArray` constructed with a `size_type` argument will
default-initialize its values by leaving trivially constructible types
uninitialized (e.g. int, int[4], double), and others default-constructed.
This matches the behavior of c-style arrays and `std::array`, but not
`std::vector`.
Public Members
static const size_type inline_elements
Public Methods
void FixedArray<T, N, A> (const FixedArray<T, N, A> & other)
Defined at line 120 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (const FixedArray<T, N, A> & other, const allocator_type & a)
Defined at line 125 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (FixedArray<T, N, A> && other)
Defined at line 129 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (FixedArray<T, N, A> && other, const allocator_type & a)
Defined at line 132 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (size_type n, const allocator_type & a)
Creates an array object that can store `n` elements.
Note that trivially constructible elements will be uninitialized.
Defined at line 139 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (size_type n, const value_type & val, const allocator_type & a)
Creates an array initialized with `n` copies of `val`.
Defined at line 148 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void FixedArray<T, N, A> (std::initializer_list<value_type> init_list, const allocator_type & a)
Creates an array initialized with the size and contents of `init_list`.
Defined at line 156 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
template <typename Iterator, EnableIfForwardIterator<Iterator>* = nullptr>
void FixedArray<T, N, A> (Iterator first, Iterator last, const allocator_type & a)
Creates an array initialized with the elements from the input
range. The array's size will always be `std::distance(first, last)`.
REQUIRES: Iterator must be a forward_iterator or better.
Defined at line 164 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void ~FixedArray<T, N, A> ()
Defined at line 170 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void operator= (FixedArray<T, N, A> && )
Assignments are deleted because they break the invariant that the size of a
`FixedArray` never changes.
Defined at line 178 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void operator= (const FixedArray<T, N, A> & )
Defined at line 179 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
size_type size ()
FixedArray::size()
Returns the length of the fixed array.
Defined at line 184 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
size_type max_size ()
FixedArray::max_size()
Returns the largest possible value of `std::distance(begin(), end())` for a
`FixedArray
<T
>`. This is equivalent to the most possible addressable bytes
over the number of bytes taken by T.
Defined at line 191 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
bool empty ()
FixedArray::empty()
Returns whether or not the fixed array is empty.
Defined at line 198 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
size_t memsize ()
FixedArray::memsize()
Returns the memory size of the fixed array in bytes.
Defined at line 203 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_pointer data ()
FixedArray::data()
Returns a const T* pointer to elements of the `FixedArray`. This pointer
can be used to access (but not modify) the contained elements.
Defined at line 209 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
pointer data ()
Overload of FixedArray::data() to return a T* pointer to elements of the
fixed array. This pointer can be used to access and modify the contained
elements.
Defined at line 216 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reference operator[] (size_type i)
FixedArray::operator[]
Returns a reference the ith element of the fixed array.
REQUIRES: 0
<
= i
<
size()
Defined at line 224 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reference operator[] (size_type i)
Overload of FixedArray::operator()[] to return a const reference to the
ith element of the fixed array.
REQUIRES: 0
<
= i
<
size()
Defined at line 232 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reference at (size_type i)
FixedArray::at
Bounds-checked access. Returns a reference to the ith element of the fixed
array, or throws std::out_of_range
Defined at line 241 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reference at (size_type i)
Overload of FixedArray::at() to return a const reference to the ith element
of the fixed array.
Defined at line 250 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reference front ()
FixedArray::front()
Returns a reference to the first element of the fixed array.
Defined at line 260 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reference front ()
Overload of FixedArray::front() to return a reference to the first element
of a fixed array of const values.
Defined at line 267 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reference back ()
FixedArray::back()
Returns a reference to the last element of the fixed array.
Defined at line 275 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reference back ()
Overload of FixedArray::back() to return a reference to the last element
of a fixed array of const values.
Defined at line 282 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
iterator begin ()
FixedArray::begin()
Returns an iterator to the beginning of the fixed array.
Defined at line 290 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_iterator begin ()
Overload of FixedArray::begin() to return a const iterator to the
beginning of the fixed array.
Defined at line 294 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_iterator cbegin ()
FixedArray::cbegin()
Returns a const iterator to the beginning of the fixed array.
Defined at line 299 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
iterator end ()
FixedArray::end()
Returns an iterator to the end of the fixed array.
Defined at line 306 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_iterator end ()
Overload of FixedArray::end() to return a const iterator to the end of the
fixed array.
Defined at line 310 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_iterator cend ()
FixedArray::cend()
Returns a const iterator to the end of the fixed array.
Defined at line 317 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reverse_iterator rbegin ()
FixedArray::rbegin()
Returns a reverse iterator from the end of the fixed array.
Defined at line 322 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reverse_iterator rbegin ()
Overload of FixedArray::rbegin() to return a const reverse iterator from
the end of the fixed array.
Defined at line 328 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reverse_iterator crbegin ()
FixedArray::crbegin()
Returns a const reverse iterator from the end of the fixed array.
Defined at line 335 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
reverse_iterator rend ()
FixedArray::rend()
Returns a reverse iterator from the beginning of the fixed array.
Defined at line 342 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reverse_iterator rend ()
Overload of FixedArray::rend() for returning a const reverse iterator
from the beginning of the fixed array.
Defined at line 348 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
const_reverse_iterator crend ()
FixedArray::crend()
Returns a reverse iterator from the beginning of the fixed array.
Defined at line 355 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
void fill (const value_type & val)
FixedArray::fill()
Assigns the given `value` to all elements in the fixed array.
Defined at line 362 of file ../../third_party/abseil-cpp/absl/container/fixed_array.h
Records
Friends
template <typename H>
H FixedArray (H h, const FixedArray<T, N, A> & v)
template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhs, const FixedArray<T, N, A> & rhs)
template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhs, const FixedArray<T, N, A> & rhs)
template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhs, const FixedArray<T, N, A> & rhs)
template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhs, const FixedArray<T, N, A> & rhs)
template <typename T, size_t N = kFixedArrayUseDefault, typename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhs, const FixedArray<T, N, A> & rhs)
template <typename Tsize_t N = kFixedArrayUseDefaulttypename A = std::allocator<T>>
bool FixedArray (const FixedArray<T, N, A> & lhsconst FixedArray<T, N, A> & rhs)