21#ifndef JKQTPARRAYTOOLS_H_INCLUDED
22#define JKQTPARRAYTOOLS_H_INCLUDED
37#include "jkqtmath/jkqtmath_imexport.h"
55#ifndef JKQTP_ALIGNMENT_BYTES
56#define JKQTP_ALIGNMENT_BYTES 32
94 if (N<=0 || !dataIn)
return nullptr;
95 T* out=
static_cast<T*
>(malloc(N*
sizeof(T)));
96 if (out) memcpy(out, dataIn, N*
sizeof(T));
this class ensures that the given pointer is freed when the class is destroyed.
Definition jkqtparraytools.h:108
JKQTPArrayScopedPointer(T *pnt)
Definition jkqtparraytools.h:110
JKQTPArrayScopedPointer< T > & operator=(T *p)
Definition jkqtparraytools.h:126
T * operator->() const
Definition jkqtparraytools.h:137
T & operator[](long long i)
Definition jkqtparraytools.h:139
T * pntr
Definition jkqtparraytools.h:149
JKQTPArrayScopedPointer< T > & operator=(const JKQTPArrayScopedPointer< T > &p)
Definition jkqtparraytools.h:131
~JKQTPArrayScopedPointer()
Definition jkqtparraytools.h:121
const T & operator[](long long i) const
Definition jkqtparraytools.h:142
T & operator*() const
Definition jkqtparraytools.h:136
T * data() const
Definition jkqtparraytools.h:138
JKQTPArrayScopedPointer()
Definition jkqtparraytools.h:113
JKQTPArrayScopedPointer(const JKQTPArrayScopedPointer &other)
Definition jkqtparraytools.h:116