STK++ 0.9.13
STK::hidden::MemChooser< 0, Type_ > Struct Template Reference

Specialization for other types using loop and operator=. More...

#include <STK_MemAllocator.h>

Static Public Member Functions

static Type_ * memcpy (Type_ *p, Type_ *q, size_t size)
 
static Type_ * memmove (Type_ *p, Type_ *q, size_t size)
 

Detailed Description

template<class Type_>
struct STK::hidden::MemChooser< 0, Type_ >

Specialization for other types using loop and operator=.

Definition at line 150 of file STK_MemAllocator.h.

Member Function Documentation

◆ memcpy()

template<class Type_ >
static Type_ * STK::hidden::MemChooser< 0, Type_ >::memcpy ( Type_ *  p,
Type_ *  q,
size_t  size 
)
inlinestatic

Definition at line 152 of file STK_MemAllocator.h.

153 {
154 for (size_t k=0; k<size; k++) { p[k] = q[k];}
155 return p;
156 }

◆ memmove()

template<class Type_ >
static Type_ * STK::hidden::MemChooser< 0, Type_ >::memmove ( Type_ *  p,
Type_ *  q,
size_t  size 
)
inlinestatic

Definition at line 157 of file STK_MemAllocator.h.

158 {
159 if (size == 0) return p;
160 if (p<q) { for (size_t k=0; k<size; k++) { p[k] = q[k];}}
161 else { for (size_t k=size-1; k==0; --k) { p[k] = q[k];}}
162 return p;
163 }

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