12#ifndef __KMP_UTILS_H__
13#define __KMP_UTILS_H__
26template <
typename T,
unsigned N = 8>
class SimpleVLA final {
28 T *HeapBuffer =
nullptr;
38 explicit SimpleVLA(
unsigned NumOfElements)
noexcept {
39 if (NumOfElements >
N) {
51 operator T *()
noexcept {
return Ptr; }
52 operator const T *()
const noexcept {
return Ptr; }
A simple pure header implementation of VLA that aims to replace uses of actual VLA,...
SimpleVLA(SimpleVLA &&)=delete
SimpleVLA(const SimpleVLA &)=delete
SimpleVLA & operator=(const SimpleVLA &)=delete
SimpleVLA(unsigned NumOfElements) noexcept
SimpleVLA & operator=(SimpleVLA &&)=delete
#define __kmp_allocate(size)