#include <mem_root_array.h>
List of all members.
Public Member Functions |
|
| Mem_root_array (MEM_ROOT *root) |
|
Element_type & | at (size_t n) |
|
const Element_type & | at (size_t n) const |
|
Element_type * | begin () |
|
Element_type * | end () |
|
void | clear () |
|
void | chop (const size_t pos) |
|
bool | reserve (size_t n) |
|
bool | push_back (const Element_type &element) |
|
size_t | capacity () const |
|
size_t | element_size () const |
|
bool | empty () const |
|
size_t | size () const |
Detailed Description
template<typename Element_type, bool has_trivial_destructor>
class Mem_root_array< Element_type, has_trivial_destructor >
A typesafe replacement for DYNAMIC_ARRAY. We use MEM_ROOT for allocating storage, rather than the C++ heap. The interface is chosen to be similar to std::vector.
- Parameters:
-
| Element_type | The type of the elements of the container. Elements must be copyable. |
| has_trivial_destructor | If true, we don't destroy elements. We could have used type traits to determine this. __has_trivial_destructor is supported by some (but not all) compilers we use. |
The documentation for this class was generated from the following file: