Руслан Урядинский / libuavcan

Dependents:   UAVCAN UAVCAN_Subscriber

Embed: (wiki syntax)

« Back to documentation index

LazyConstructor< T > Class Template Reference

LazyConstructor< T > Class Template Reference

This class allows to postpone the object contruction. More...

#include <lazy_constructor.hpp>


Detailed Description

template<typename T>
class uavcan::LazyConstructor< T >

This class allows to postpone the object contruction.

It statically allocates a pool of memory of just enough size to fit the object being constructed. Later call to construct<>() calls the constructor of the object. The object will be destroyed automatically when the container class destructor is called. The memory pool is aligned at the size of the largest primitive type (long double or long long int).

Definition at line 27 of file lazy_constructor.hpp.