Frobby 0.10.0
Loading...
Searching...
No Matches
LocalArray< T, ArenaSource > Class Template Reference

#include <LocalArray.h>

Public Member Functions

 LocalArray (const size_t sizeParam)
T & operator[] (const size_t i) const
T * begin () const
T * end () const
size_t size () const

Detailed Description

template<class T, class ArenaSource = Arena>
class LocalArray< T, ArenaSource >

Emulates stack allocation of an array using an Arena.

The scoping rules of C++ ensure stack order allocation and deallocation if the Arena is only accessed using objects like this.

T is the type of the objects to make an array of.

ArenaSource is any type that has a public and static getArena function. That function must return a reference to the same Arena each time it is called. ArenaSource is useful for testing.


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