ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::boxing::compatibility::std Namespace Reference

Description:

This namespace documents compatibility features of ALib Boxing and the standard C++ class library found in namespace std.

Type Index:

struct  equal_to< alib::boxing::Box >
 
struct  equal_to< alib::boxing::Enum >
 
struct  hash< alib::boxing::Box >
 
struct  hash< alib::boxing::Enum >
 
struct  less< alib::boxing::Box >
 
struct  less< alib::boxing::Enum >
 
struct  T_Boxer< std::array< TElement, N >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) >
 
struct  T_Boxer< std::vector< TElement >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) >
 

Function Index:

void BootstrapStdStringBoxing ()
 
template<typename TElement >
void CopyToVector (::std::vector< TElement > &target, const Box &box)
 

Function Details:

◆ BootstrapStdStringBoxing()

void BootstrapStdStringBoxing ( )
inline

Initializes ALib Boxing in respect to std::string-types.

This method is not automatically invoked with function Bootstrap , because support for boxing std::string-types is optional and provided with the inclusion of header alib/compatibility/std_boxing.hpp .

In general boxing of std::string-types works well without the one-time invocation of this function at the bootstrap of a process. This method registers box-function FAppend for std::string-types types when custom boxing is bypassed by wrapping the types in std::reference_wrapper<T>. The function is implemented with the help of FAppend::WrappedAppendable for wrapped std::string-types, each for character types nchar and wchar.

Note
If invoked after bootstrap and modules ALib Threads and ALib Memory are included in the ALib Distribution , mutex GlobalAllocatorLock has to be locked prior to an invocation. Bootstrapping may look as follows:
ALIB_IF_THREADS( monomem::GlobalAllocatorLock.Acquire(ALIB_CALLER_PRUNED); )
ALIB_IF_THREADS( monomem::GlobalAllocatorLock.Release(); )
Alternatively, bootstrapping can be performed until BootstrapPhases::PrepareConfig and then this function can be invoked. In this case, no locking is necessary.

Definition at line 205 of file std_boxing.hpp.

◆ CopyToVector()

template<typename TElement >
void CopyToVector ( ::std::vector< TElement > & target,
const Box & box )
inline

Creates a deep copy of a boxed C++ array type by appending its contents to a given std::vector of corresponding element type.
Note that no type checks are performed on the given box.

Template Parameters
TElementThe element type.
Parameters
targetThe target vector to fill.
boxThe source box of type TElement[] .

Definition at line 166 of file std_boxing.hpp.

Here is the call graph for this function: