2 * Copyright 2012, Jonathan Schleifer <js@webkeks.org>. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _SUPPORT_STACKORHEAPARRAY_H
6 #define _SUPPORT_STACKORHEAPARRAY_H
11 template <typename Type
, int StackSize
>
12 class BStackOrHeapArray
{
14 BStackOrHeapArray(size_t count
)
16 if (count
> StackSize
)
17 fData
= new(std::nothrow
) Type
[count
];
24 if (fData
!= fStackData
)
39 Type fStackData
[StackSize
];