GCS  0.2.3
Public Member Functions
gu::VLA< T > Class Template Reference

#include <gu_utils.hpp>

Public Member Functions

 VLA (size_t n)
 
T * operator& ()
 
T & operator[] (size_t i)
 

Detailed Description

template<typename T>
class gu::VLA< T >

Substitute for the Variable Length Array on the stack from C99. Provides automatic deallocation when out of scope:

void foo(size_t n) { VLA<int> bar(n); bar[0] = 5; throw; }


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