#include "Utilities/PAssert.h"
#include <new>
Classes | |
class | UninitializedVector< T, Dim, Elem > |
UninitializedVector<T,Dim> stores internally an array of object of type 'Elem', of length sizeof(T) * Dim / sizeof(Elem), where T and Elem are some arbitrary types. More... | |
struct | InitializeUninitializedVector< T, I > |
InitializeUninitializedVector is a simple functor with an N-D and 1-D version used for template meta-programs to initialize the first 'Dim' elems of the data in the given UninitializedVector. More... | |
struct | InitializeUninitializedVector< T, 0 > |
zeroth-index specialization of InitializeUninitializedVector More... |
DO NOT USE FOR NEW CODE AS THIS POSSIBLY BREAKS ALIASING RULES OR AT LEAST HINDERS OPTIMIZATION.
It can help avoid unwanted for-loops over array elements which are normally generated in order to run their default constructors, even when the length of the array is known at compile time. It can be used to unroll the loop over the array elements to run their constructors, in order to initialize a whole array of objects with a non-default constructor in one call.