![]() |
WPILibC++ 2025.3.2
|
A zero overhead dynamic array using joint memory. More...
#include <wpi/memory/joint_allocator.hpp>
Public Types | |
| using | value_type = T |
| using | iterator = value_type* |
| using | const_iterator = const value_type* |
Public Member Functions | |
| template<typename JointType > | |
| joint_array (std::size_t size, joint_type< JointType > &j) | |
| template<typename JointType > | |
| joint_array (std::size_t size, const value_type &val, joint_type< JointType > &j) | |
| template<typename JointType > | |
| joint_array (std::initializer_list< value_type > ilist, joint_type< JointType > &j) | |
| template<typename InIter , typename JointType , typename = decltype(*std::declval<InIter&>()++)> | |
| joint_array (InIter begin, InIter end, joint_type< JointType > &j) | |
| joint_array (const joint_array &)=delete | |
| template<typename JointType > | |
| joint_array (const joint_array &other, joint_type< JointType > &j) | |
| joint_array (joint_array &&)=delete | |
| template<typename JointType > | |
| joint_array (joint_array &&other, joint_type< JointType > &j) | |
| ~joint_array () noexcept | |
| joint_array & | operator= (const joint_array &)=delete |
| joint_array & | operator= (joint_array &&)=delete |
| std::size_t | size () const noexcept |
| bool | empty () const noexcept |
| value_type & | operator[] (std::size_t i) noexcept |
| const value_type & | operator[] (std::size_t i) const noexcept |
| value_type * | data () noexcept |
| const value_type * | data () const noexcept |
| iterator | begin () noexcept |
| const_iterator | begin () const noexcept |
| iterator | end () noexcept |
| const_iterator | end () const noexcept |
A zero overhead dynamic array using joint memory.
If you use, e.g. std::vector with joint_allocator, this has a slight additional overhead. This type is joint memory aware and has no overhead.
It has a dynamic, but fixed size, it cannot grow after it has been created.
| using wpi::memory::joint_array< T >::const_iterator = const value_type* |
| using wpi::memory::joint_array< T >::iterator = value_type* |
| using wpi::memory::joint_array< T >::value_type = T |
|
inline |
size default-constructed objects using the specified joint memory. size is too big and anything thrown by Ts constructor. If an allocation is thrown, the memory will be released directly.
|
inline |
size copies of val using the specified joint memory. size is too big and anything thrown by Ts constructor. If an allocation is thrown, the memory will be released directly.
|
inline |
Ts constructor. If an allocation is thrown, the memory will be released directly.
|
inline |
Ts constructor using the specified joint memory. Ts constructor. If an allocation is thrown, the memory will be released directly.
|
delete |
|
inline |
other into the storage of the specified joint memory. Ts constructor. If an allocation is thrown, the memory will be released directly.
|
delete |
|
inline |
other into the storage of the specified joint memory. Ts constructor. If an allocation is thrown, the memory will be released directly.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
true if the array is empty, false otherwise.
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
ith object. i < size().
|
inlinenoexcept |