24#ifndef MYSQL_ABI_HELPERS_ARRAY_VIEW_H
25#define MYSQL_ABI_HELPERS_ARRAY_VIEW_H
51template <
class Element_tp>
52 requires requires { std::is_trivial_v<Element_tp>; }
104static_assert(std::is_trivial_v<Array_view<int>>);
105static_assert(std::is_trivially_default_constructible_v<Array_view<int>>);
106static_assert(std::is_trivially_destructible_v<Array_view<int>>);
107static_assert(std::is_trivially_copy_constructible_v<Array_view<int>>);
108static_assert(std::is_trivially_move_constructible_v<Array_view<int>>);
109static_assert(std::is_trivially_copy_assignable_v<Array_view<int>>);
110static_assert(std::is_trivially_move_assignable_v<Array_view<int>>);
111static_assert(std::is_standard_layout_v<Array_view<int>>);
Ownership-agnostic array class, which is both trivial and standard-layout.
Definition: array_view.h:53
void clear()
Definition: array_view.h:98
void assign(Element_t *array, std::size_t size)
Definition: array_view.h:66
void free()
Free the array, assuming it was previously allocated using allocate (or my_malloc).
Definition: array_view.h:92
void allocate(std::size_t size, PSI_memory_key key)
Create a new array of the given type, replacing the existing one without deallocating it.
Definition: array_view.h:82
Array_view(Element_t *array, std::size_t size)
Construct a view over the given array.
Definition: array_view.h:63
Element_tp Element_t
Definition: array_view.h:59
Base class for specific implementations of standard-layout classes for arrays.
Definition: array_base.h:51
int32_t m_size
Number of elements in the array.
Definition: array_base.h:115
std::size_t size() const
Definition: array_base.h:54
Element_tp * m_data
Array data.
Definition: array_base.h:118
Element_tp * data()
Definition: array_base.h:75
#define MY_WME
Definition: my_sys.h:130
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
#define MYF(v)
Definition: my_inttypes.h:97
void * my_malloc(PSI_memory_key key, size_t size, int flags)
Allocates size bytes of memory.
Definition: my_memory.cc:57
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
Common header for many mysys elements.
Definition: array_view.h:42
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60