ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
T_Boxer< std::array< TElement, N >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) > Struct Template Reference

Description:

template<typename TElement, size_t N>
struct alib::boxing::compatibility::std::T_Boxer< std::array< TElement, N >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) >

Specialization of struct T_Boxer for template type std::array<T, Size>> Instead of boxing a pointer to the array object, a boxed array is stored, hence a pointer to the first element contents and the array's 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::array instances of those types is customized by the specialization of T_CharArray , as described in manual chapter 10. Boxing Character Strings.

Note
As mandatory, the specialization is defined in alib::boxing. To keep the reference documentation of that namespace clean, it is documented here.
Template Parameters
TElementThe element type of the array.
NThe size of the array.

Definition at line 73 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::array< TElement, N > &value)
 

Type Definition Details:

◆ Mapping

template<typename TElement , size_t N>
using Mapping = TMappedToArrayOf<TElement>

Mapped type is TElement[].

Definition at line 76 of file std_boxing.hpp.

Method Details:

◆ Read()

template<typename TElement , size_t N>
static void Read ( const Placeholder & src)
static

Forbid unboxing by declaring Read as void.

Parameters
srcIgnored.

◆ Write()

template<typename TElement , size_t N>
static void Write ( Placeholder & target,
const std::array< TElement, N > & value )
inlinestatic

Implementation of custom boxing for template class std::array

Parameters
targetThe placeholder of the target box.
valueThe object to box.

Definition at line 83 of file std_boxing.hpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: