Specialization of struct T_Boxer for template type std::vector<T, std::allocator<T>>
Instead of boxing a pointer to the vector object, a boxed array is stored, hence a pointer to the first element contents and the array length.
To enable this behavior, header file "alib/compatibility/std_boxing.hpp"
needs to be included in the corresponding compilation unit.
Excluded from the specialization are character arrays. Boxing of std::vector
instances of those types is customized by the specialization of T_CharArray , as described in manual chapter 10. Boxing Character Strings.
TElement | The element type of the vector. |
Definition at line 118 of file std_boxing.hpp.
#include <std_boxing.hpp>
Public Type Index: | |
using | Mapping = TMappedToArrayOf<TElement> |
Public Static Method Index: | |
static void | Read (const Placeholder &src) |
static void | Write (Placeholder &target, const std::vector< TElement > &value) |
using Mapping = TMappedToArrayOf<TElement> |
Mapped type is TElement
[].
Definition at line 121 of file std_boxing.hpp.
|
static |
Forbid unboxing by declaring Read as void.
src | Ignored. |
|
inlinestatic |
Implementation of custom boxing for template class std::vector
target | The placeholder of the target box. |
value | The object to box. |
Definition at line 128 of file std_boxing.hpp.